diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-07-03 04:58:30 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-07-03 04:58:30 +0200 |
commit | d03595f64e264aed21a53c5d238125ce09a90f02 (patch) | |
tree | 9d04e04fcf636cccc0efd625d0ef7ecb964c92c6 /OpenKeychain/src/main/res | |
parent | d6b4d4b4f223f28bcee39cc72c8243f000a55b2b (diff) | |
download | open-keychain-d03595f64e264aed21a53c5d238125ce09a90f02.tar.gz open-keychain-d03595f64e264aed21a53c5d238125ce09a90f02.tar.bz2 open-keychain-d03595f64e264aed21a53c5d238125ce09a90f02.zip |
New NFC dialog design with indeterminate progress, do NFC stuff in background
Diffstat (limited to 'OpenKeychain/src/main/res')
-rw-r--r-- | OpenKeychain/src/main/res/drawable/yubikey_phone.png | bin | 352625 -> 347902 bytes | |||
-rw-r--r-- | OpenKeychain/src/main/res/layout/nfc_activity.xml | 95 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/values/strings.xml | 4 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/values/themes.xml | 5 |
4 files changed, 81 insertions, 23 deletions
diff --git a/OpenKeychain/src/main/res/drawable/yubikey_phone.png b/OpenKeychain/src/main/res/drawable/yubikey_phone.png Binary files differindex 6a03501c6..3cdfbba0f 100644 --- a/OpenKeychain/src/main/res/drawable/yubikey_phone.png +++ b/OpenKeychain/src/main/res/drawable/yubikey_phone.png diff --git a/OpenKeychain/src/main/res/layout/nfc_activity.xml b/OpenKeychain/src/main/res/layout/nfc_activity.xml index 9acd0676c..724b4606c 100644 --- a/OpenKeychain/src/main/res/layout/nfc_activity.xml +++ b/OpenKeychain/src/main/res/layout/nfc_activity.xml @@ -1,35 +1,86 @@ <?xml version="1.0" encoding="utf-8"?> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:custom="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="wrap_content"> - <include - android:id="@+id/toolbar_include" - layout="@layout/toolbar_standalone" /> - - <LinearLayout - android:layout_below="@id/toolbar_include" + <org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator + android:id="@+id/view_animator" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical" - android:paddingLeft="16dp" - android:paddingRight="16dp" + android:animateLayoutChanges="true" + android:inAnimation="@anim/fade_in" + android:measureAllChildren="false" + android:minHeight="?listPreferredItemHeightSmall" + android:outAnimation="@anim/fade_out" + android:paddingBottom="16dp" + android:paddingLeft="24dp" + android:paddingRight="24dp" android:paddingTop="16dp" - android:paddingBottom="16dp"> + custom:initialView="0"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/toolbar_include" + android:layout_gravity="center" + android:orientation="vertical"> - <TextView - android:text="@string/nfc_text" - android:layout_width="wrap_content" + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/nfc_text" + android:textAppearance="@android:style/TextAppearance.Medium" /> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:adjustViewBounds="true" + android:src="@drawable/yubikey_phone" + android:id="@+id/nfc_image" + android:background="@android:color/transparent" /> + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:textAppearance="@android:style/TextAppearance.Large" - android:id="@+id/nfc_text" + android:layout_below="@id/toolbar_include" + android:layout_gravity="center" android:gravity="center" - android:layout_gravity="center" /> + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/nfc_wait" + android:textAppearance="@android:style/TextAppearance.Medium" /> - <ImageView + <ProgressBar + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:padding="8dp" /> + + </LinearLayout> + + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:src="@drawable/yubikey_phone" /> + android:layout_below="@id/toolbar_include" + android:layout_gravity="center" + android:gravity="center" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/nfc_finished" + android:textAppearance="@android:style/TextAppearance.Medium" /> + + </LinearLayout> + + </org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator> + - </LinearLayout> -</RelativeLayout>
\ No newline at end of file +</LinearLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index 18f642e3a..e76cb5b36 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -225,7 +225,9 @@ <string name="passphrase_for">"Enter password for '%s'"</string> <string name="pin_for">"Enter PIN for '%s'"</string> <string name="yubikey_pin_for">"Enter PIN to access YubiKey for '%s'"</string> - <string name="nfc_text">"Hold YubiKey against the back of your device."</string> + <string name="nfc_text">"Hold YubiKey against the NFC marker at the back of your device."</string> + <string name="nfc_wait">"Don't release the YubiKey yet!"</string> + <string name="nfc_finished">"Success"</string> <string name="file_delete_confirmation_title">"Delete original files?"</string> <string name="file_delete_confirmation">"The following files will be deleted:%s"</string> <string name="file_delete_successful">"%1$d out of %2$d files have been deleted.%3$s"</string> diff --git a/OpenKeychain/src/main/res/values/themes.xml b/OpenKeychain/src/main/res/values/themes.xml index 6ac09c5d7..1760ca5ec 100644 --- a/OpenKeychain/src/main/res/values/themes.xml +++ b/OpenKeychain/src/main/res/values/themes.xml @@ -35,4 +35,9 @@ <!-- Layout for query suggestion rows --> <!--<item name="suggestionRowLayout">...</item>--> </style> + + <style name="KeychainTheme.DialogWithoutTitle" parent="@style/Theme.AppCompat.Light.Dialog.MinWidth"> + <item name="windowActionBar">false</item> + <item name="windowNoTitle">true</item> + </style> </resources>
\ No newline at end of file |