Externalize secret key selection into fragment for reuse in different activities
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
@@ -37,49 +38,12 @@
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
<fragment
|
||||
android:id="@+id/api_app_settings_select_key_fragment"
|
||||
android:name="org.sufficientlysecure.keychain.ui.SelectSecretKeyLayoutFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/api_app_settings_select_key_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="4dp"
|
||||
android:text="@string/api_settings_select_key"
|
||||
bootstrapbutton:bb_icon_left="fa-key"
|
||||
bootstrapbutton:bb_size="default"
|
||||
bootstrapbutton:bb_type="default" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="16dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/api_app_settings_user_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/api_settings_no_key"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/api_app_settings_user_id_rest"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
tools:layout="@layout/select_secret_key_layout_fragment" />
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/api_app_settings_advanced_button"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
android:orientation="vertical" >
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/keyServer"
|
||||
android:id="@+id/sign_key_keyserver"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
android:orientation="vertical" >
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/keyServer"
|
||||
android:id="@+id/sign_key_keyserver"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/select_secret_key_select_key_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="4dp"
|
||||
android:text="@string/api_settings_select_key"
|
||||
bootstrapbutton:bb_icon_left="fa-key"
|
||||
bootstrapbutton:bb_size="default"
|
||||
bootstrapbutton:bb_type="default" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="16dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/select_secret_key_user_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="@string/api_settings_no_key"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/select_secret_key_user_id_rest"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text=""
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,14 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:bootstrapbutton="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal" >
|
||||
</LinearLayout>
|
||||
<include layout="@layout/select_secret_key_layout_fragment" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -16,20 +14,17 @@
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/label_send_key"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" >
|
||||
</TextView>
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/sendKey"
|
||||
android:id="@+id/sign_key_upload_checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="" >
|
||||
</CheckBox>
|
||||
android:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -38,17 +33,19 @@
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/keyServer"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/sign_key_keyserver"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/sign"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/btn_sign" >
|
||||
</Button>
|
||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||
android:id="@+id/sign_key_sign_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:padding="4dp"
|
||||
android:text="@string/btn_sign"
|
||||
bootstrapbutton:bb_icon_left="fa-lock"
|
||||
bootstrapbutton:bb_type="info" />
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user