Passphrase wizard tests
This commit is contained in:
BIN
OpenKeychain/src/main/res/drawable/nfc.png
Normal file
BIN
OpenKeychain/src/main/res/drawable/nfc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/topLayout"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.haibison.android.lockpattern.widget.LockPatternView_v14
|
||||
android:id="@+id/lockPattern"
|
||||
android:layout_width="@dimen/alp_42447968_separator_size"
|
||||
android:layout_height="@dimen/alp_42447968_separator_size"
|
||||
android:layout_marginTop="@dimen/alp_42447968_separator_size"
|
||||
android:layout_marginBottom="@dimen/alp_42447968_separator_size"
|
||||
android:layout_gravity="center_horizontal" />
|
||||
</LinearLayout>
|
||||
11
OpenKeychain/src/main/res/layout/passphrase_wizard.xml
Normal file
11
OpenKeychain/src/main/res/layout/passphrase_wizard.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nfcText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:text="@string/nfc_text"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:lines="2" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/imageView"
|
||||
android:padding="16dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:src="@drawable/nfc"
|
||||
android:adjustViewBounds="true" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,109 @@
|
||||
<LinearLayout 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:padding="16dp"
|
||||
android:orientation="vertical"
|
||||
tools:context="pSontag.testopenkeychain.Passphrase">
|
||||
|
||||
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TableRow
|
||||
android:layout_marginBottom="10dp">
|
||||
<TextView
|
||||
android:id="@+id/passphraseText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_span="2"
|
||||
android:padding="8dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/passphrase"
|
||||
android:layout_weight="1"/>
|
||||
</TableRow>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:layout_weight="1"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/passphrase"/>
|
||||
<EditText
|
||||
android:id="@+id/passphrase"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:padding="8dp"
|
||||
android:layout_weight="6"/>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp">
|
||||
<TextView
|
||||
android:id="@+id/passphraseTextAgain"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:text="@string/passphrase_again"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:layout_weight="1"/>
|
||||
<EditText
|
||||
android:id="@+id/passphraseAgain"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="textPassword"
|
||||
android:imeOptions="actionDone"
|
||||
android:padding="8dp"
|
||||
android:layout_weight="6"/>
|
||||
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Cancel"
|
||||
android:onClick="cancel"
|
||||
android:layout_weight="1"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
style="?attr/alp_42447968_button_bar_button_style"/>
|
||||
<View
|
||||
android:layout_width="1dip"
|
||||
android:layout_height="50dip"
|
||||
android:background="?android:attr/listDivider" />
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ok"
|
||||
android:onClick="savePassphrase"
|
||||
android:layout_weight="1"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
style="?attr/alp_42447968_button_bar_button_style"/>
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="?android:attr/listDivider" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,89 @@
|
||||
<ScrollView 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:padding="16dp"
|
||||
tools:context="pSontag.testopenkeychain.SelectMethods">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/title_unlock_method"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/selectNoPassphrase"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/noPassphrase"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:padding="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:clickable="true"
|
||||
android:onClick="noPassphrase"
|
||||
style="@style/SelectableItem"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="?android:attr/listDivider" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/selectPassphrase"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/passphrase"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:padding="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:clickable="true"
|
||||
android:onClick="passphrase"
|
||||
style="@style/SelectableItem"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="?android:attr/listDivider" />
|
||||
<TextView
|
||||
android:id="@+id/selectLockpattern"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/lockpattern"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:padding="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:clickable="true"
|
||||
android:onClick="startLockpattern"
|
||||
style="@style/SelectableItem"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dip"
|
||||
android:background="?android:attr/listDivider" />
|
||||
<TextView
|
||||
android:id="@+id/selectLockpatternNFC"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/lockpatternNFC"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:padding="8dp"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:clickable="true"
|
||||
android:onClick="NFC"
|
||||
style="@style/SelectableItem"/>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@@ -1054,4 +1054,31 @@
|
||||
<string name="first_time_import_key">"Import from file"</string>
|
||||
<string name="first_time_skip">"Skip Setup"</string>
|
||||
|
||||
<!-- Passphrase wizard -->
|
||||
<!-- TODO: rename all the things! -->
|
||||
<string name="title_unlock_method">Choose an unlock method</string>
|
||||
<!--<string name="enter_passphrase_twice">Enter passphrase twice</string>-->
|
||||
<string name="enter_passphrase">Enter passphrase</string>
|
||||
<string name="passphrase">Passphrase</string>
|
||||
<string name="noPassphrase">No passphrase</string>
|
||||
<string name="no_passphrase_set">No passphrase set</string>
|
||||
<string name="passphrases_match">Passphrases do match</string>
|
||||
<string name="passphrase_saved">Passphrase saved</string>
|
||||
<string name="passphrase_invalid">Passphrase invalid</string>
|
||||
<string name="missing_passphrase">Missing passphrase</string>
|
||||
<string name="passphrase_again">Again</string>
|
||||
<string name="lockpattern">Lockpattern</string>
|
||||
<string name="lockpatternNFC">NFC + Lockpattern</string>
|
||||
<string name="unlock_method">Unlock method</string>
|
||||
<string name="set_passphrase">Set passphrase</string>
|
||||
<string name="draw_lockpattern">Draw lockpattern</string>
|
||||
<string name="nfc_title">NFC</string>
|
||||
<!--<string name="nfc_text">Please place a NFC tag near your device</string>-->
|
||||
<string name="nfc_wrong_tag">Wrong Tag. Please try again.</string>
|
||||
<string name="enable_nfc">Please activate NFC in your settings</string>
|
||||
<string name="no_nfc_support">This device does not support NFC</string>
|
||||
<string name="nfc_write_succesful">Successfully written on NFC tag</string>
|
||||
<string name="unlocked">Unlocked</string>
|
||||
<string name="nfc_settings">Settings</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user