diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-07-06 16:21:48 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-07-06 16:21:48 +0200 |
commit | 1eb438576d862df8bf8c7221a6bebee7e8dd85f3 (patch) | |
tree | 689853089f80748e3861f17379a5fedc7a378bf9 /OpenKeychain/src/main/res/layout/nfc_operation_activity.xml | |
parent | 0c6ef6aed45130b3958fd351558df52738979dae (diff) | |
download | open-keychain-1eb438576d862df8bf8c7221a6bebee7e8dd85f3.tar.gz open-keychain-1eb438576d862df8bf8c7221a6bebee7e8dd85f3.tar.bz2 open-keychain-1eb438576d862df8bf8c7221a6bebee7e8dd85f3.zip |
Better YubiKey UX flow for error handling
Diffstat (limited to 'OpenKeychain/src/main/res/layout/nfc_operation_activity.xml')
-rw-r--r-- | OpenKeychain/src/main/res/layout/nfc_operation_activity.xml | 179 |
1 files changed, 179 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/res/layout/nfc_operation_activity.xml b/OpenKeychain/src/main/res/layout/nfc_operation_activity.xml new file mode 100644 index 000000000..8b043861f --- /dev/null +++ b/OpenKeychain/src/main/res/layout/nfc_operation_activity.xml @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:custom="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator + android:id="@+id/view_animator" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:animateLayoutChanges="true" + android:inAnimation="@anim/fade_in" + android:measureAllChildren="false" + android:minHeight="?listPreferredItemHeightSmall" + android:outAnimation="@anim/fade_out" + custom:initialView="3"> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <TextView + android:id="@+id/nfc_activity_0_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="24dp" + android:layout_marginRight="24dp" + android:layout_marginTop="24dp" + android:text="@string/nfc_text" + android:textAppearance="@android:style/TextAppearance.Medium" /> + + <ImageView + android:id="@+id/nfc_activity_0_image" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_below="@+id/nfc_activity_0_text" + android:layout_margin="24dp" + android:adjustViewBounds="true" + android:background="@android:color/transparent" + android:src="@drawable/yubikey_phone" /> + </RelativeLayout> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <TextView + android:id="@+id/nfc_activity_1_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="24dp" + android:layout_marginRight="24dp" + android:layout_marginTop="24dp" + android:text="@string/nfc_wait" + android:textAppearance="@android:style/TextAppearance.Medium" /> + + <ProgressBar + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:padding="8dp" /> + + <!-- placeholder to retain dialog size --> + <ImageView + android:id="@+id/nfc_activity_1_placeholder" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_below="@+id/nfc_activity_1_text" + android:layout_margin="24dp" + android:adjustViewBounds="true" + android:background="@android:color/transparent" + android:src="@drawable/yubikey_phone" + android:visibility="invisible" /> + + </RelativeLayout> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <TextView + android:id="@+id/nfc_activity_2_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="24dp" + android:layout_marginRight="24dp" + android:layout_marginTop="24dp" + android:text="@string/nfc_finished" + android:textAppearance="@android:style/TextAppearance.Medium" /> + + <!-- placeholder to retain dialog size --> + <ImageView + android:id="@+id/nfc_activity_2_placeholder" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_below="@+id/nfc_activity_2_text" + android:layout_margin="24dp" + android:adjustViewBounds="true" + android:background="@android:color/transparent" + android:src="@drawable/yubikey_phone" + android:visibility="invisible" /> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:adjustViewBounds="true" + android:background="@android:color/transparent" + android:src="@drawable/ic_check_circle_black_48dp" /> + + </RelativeLayout> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <TextView + android:id="@+id/nfc_activity_3_text_placeholder" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignEnd="@+id/nfc_activity_3_placeholder" + android:layout_alignRight="@+id/nfc_activity_3_placeholder" + android:layout_marginLeft="24dp" + android:layout_marginTop="24dp" + android:text="" + android:textAppearance="@android:style/TextAppearance.Medium" /> + + <!-- placeholder to retain dialog size --> + <ImageView + android:id="@+id/nfc_activity_3_placeholder" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_below="@+id/nfc_activity_3_text_placeholder" + android:layout_margin="24dp" + android:adjustViewBounds="true" + android:background="@android:color/transparent" + android:src="@drawable/yubikey_phone" + android:visibility="invisible" /> + + <TextView + android:id="@+id/nfc_activity_3_error_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:layout_margin="24dp" + android:textAppearance="@android:style/TextAppearance.Medium" + android:textColor="@color/android_red_dark" + tools:text="Error text" /> + + <Button + android:id="@+id/nfc_activity_3_error_try_again" + style="?android:attr/borderlessButtonStyle" + android:layout_width="wrap_content" + android:layout_height="48dp" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_below="@+id/nfc_activity_3_placeholder" + android:layout_margin="8dp" + android:text="@string/error_nfc_try_again" + android:textColor="@color/accent" /> + + </RelativeLayout> + + </org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator> + +</LinearLayout>
\ No newline at end of file |