1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 08:14:15 +00:00

perms prompt now doesn't show the back button - android

This commit is contained in:
hypnosis-i2p 2018-02-18 00:25:58 +08:00
parent fbcc4f28e7
commit 1de4c2e8c6
3 changed files with 6 additions and 1 deletions

View File

@ -18,6 +18,7 @@
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/icon" android:icon="@drawable/icon"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@android:style/Theme.Holo.Light.DarkActionBar"
> >
<receiver android:name=".NetworkStateChangeReceiver"> <receiver android:name=".NetworkStateChangeReceiver">
<intent-filter> <intent-filter>

View File

@ -124,6 +124,8 @@ public class I2PDPermsAskerActivity extends Activity {
ActivityCompat.requestPermissions(I2PDPermsAskerActivity.this, ActivityCompat.requestPermissions(I2PDPermsAskerActivity.this,
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
PERMISSION_WRITE_EXTERNAL_STORAGE); PERMISSION_WRITE_EXTERNAL_STORAGE);
} else {
finish(); //close the app
} }
} }
} }

View File

@ -1,5 +1,6 @@
package org.purplei2p.i2pd; package org.purplei2p.i2pd;
import android.app.ActionBar;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.app.Activity; import android.app.Activity;
@ -12,7 +13,8 @@ public class I2PDPermsExplanationActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_perms_explanation); setContentView(R.layout.activity_perms_explanation);
//getActionBar().setDisplayHomeAsUpEnabled(true); ActionBar actionBar = getActionBar();
if(actionBar!=null)actionBar.setHomeButtonEnabled(false);
Button button_ok = (Button) findViewById(R.id.button_ok); Button button_ok = (Button) findViewById(R.id.button_ok);
button_ok.setOnClickListener(new View.OnClickListener() { button_ok.setOnClickListener(new View.OnClickListener() {
@Override @Override