mirror of https://github.com/PurpleI2P/i2pd.git
hypnosis-i2p
7 years ago
7 changed files with 136 additions and 34 deletions
@ -0,0 +1,27 @@ |
|||||||
|
<LinearLayout android:id="@+id/layout_prompt" |
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
xmlns:tools="http://schemas.android.com/tools" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent" |
||||||
|
android:orientation="vertical" |
||||||
|
android:paddingBottom="@dimen/vertical_page_margin" |
||||||
|
android:paddingLeft="@dimen/horizontal_page_margin" |
||||||
|
android:paddingRight="@dimen/horizontal_page_margin" |
||||||
|
android:paddingTop="@dimen/vertical_page_margin" |
||||||
|
tools:context=".I2PDPermsAskerActivity"> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:id="@+id/textview_explanation" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_marginBottom="@dimen/horizontal_page_margin" |
||||||
|
android:text="SD card write access is required to write the keys and other files to the I2PD folder on SD card." |
||||||
|
/> |
||||||
|
|
||||||
|
<Button |
||||||
|
android:id="@+id/button_ok" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:text="OK" |
||||||
|
/> |
||||||
|
</LinearLayout> |
@ -0,0 +1,36 @@ |
|||||||
|
package org.purplei2p.i2pd; |
||||||
|
|
||||||
|
import android.content.Intent; |
||||||
|
import android.os.Bundle; |
||||||
|
import android.app.Activity; |
||||||
|
import android.view.View; |
||||||
|
import android.widget.Button; |
||||||
|
|
||||||
|
public class I2PDPermsExplanationActivity extends Activity { |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void onCreate(Bundle savedInstanceState) { |
||||||
|
super.onCreate(savedInstanceState); |
||||||
|
setContentView(R.layout.activity_perms_explanation); |
||||||
|
//getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
Button button_ok = (Button) findViewById(R.id.button_ok); |
||||||
|
button_ok.setOnClickListener(new View.OnClickListener() { |
||||||
|
@Override |
||||||
|
public void onClick(View view) { |
||||||
|
returnFromActivity(); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
private void returnFromActivity() { |
||||||
|
Intent data = new Intent(); |
||||||
|
Activity parent = getParent(); |
||||||
|
if (parent == null) { |
||||||
|
setResult(Activity.RESULT_OK, data); |
||||||
|
} else { |
||||||
|
parent.setResult(Activity.RESULT_OK, data); |
||||||
|
} |
||||||
|
finish(); |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue