diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-02-26 02:06:57 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-02-26 02:06:57 +0100 |
commit | 72acaaa41f88c729b651575a2c014cff11ca0fe4 (patch) | |
tree | 96875707d11f4b9dceb0c9493f0daa1fb3fcb730 /OpenKeychain/src/main/res | |
parent | a38f84a40169a65bf0eac1e06165a844df9b642c (diff) | |
download | open-keychain-72acaaa41f88c729b651575a2c014cff11ca0fe4.tar.gz open-keychain-72acaaa41f88c729b651575a2c014cff11ca0fe4.tar.bz2 open-keychain-72acaaa41f88c729b651575a2c014cff11ca0fe4.zip |
Fingerprint verification, design fixes for qr code card
Diffstat (limited to 'OpenKeychain/src/main/res')
9 files changed, 214 insertions, 28 deletions
diff --git a/OpenKeychain/src/main/res/layout/certify_fingerprint_activity.xml b/OpenKeychain/src/main/res/layout/certify_fingerprint_activity.xml new file mode 100644 index 000000000..ec91d1455 --- /dev/null +++ b/OpenKeychain/src/main/res/layout/certify_fingerprint_activity.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:card_view="http://schemas.android.com/apk/res-auto" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include + android:id="@+id/toolbar_include" + layout="@layout/toolbar_standalone" /> + + <LinearLayout + android:layout_below="@id/toolbar_include" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <FrameLayout + android:id="@+id/content_frame" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <FrameLayout + android:id="@+id/certify_fingerprint_fragment" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" /> + + </FrameLayout> + + </LinearLayout> +</RelativeLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/certify_fingerprint_fragment.xml b/OpenKeychain/src/main/res/layout/certify_fingerprint_fragment.xml new file mode 100644 index 000000000..9b6b35012 --- /dev/null +++ b/OpenKeychain/src/main/res/layout/certify_fingerprint_fragment.xml @@ -0,0 +1,154 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <ScrollView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_above="@+id/certify_fingerprint_buttons_divider"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="16dp"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + android:layout_marginLeft="8dp" + android:layout_marginRight="8dp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:text="@string/certify_fingerprint_text" /> + + <android.support.v7.widget.CardView + android:id="@+id/certify_fingerprint_card" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:cardBackgroundColor="@android:color/white" + app:cardUseCompatPadding="true" + app:cardCornerRadius="4dp" + android:layout_gravity="top"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + style="@style/CardViewHeader" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/label_fingerprint" /> + + <TextView + android:id="@+id/certify_fingerprint_fingerprint" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:textSize="20sp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:typeface="monospace" + android:gravity="center_vertical" /> + </LinearLayout> + + </android.support.v7.widget.CardView> + + </LinearLayout> + + </ScrollView> + + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" + android:id="@+id/certify_fingerprint_buttons"> + + <TextView + android:id="@+id/certify_fingerprint_button_no" + android:paddingLeft="8dp" + android:paddingRight="8dp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@string/btn_no" + android:minHeight="?android:attr/listPreferredItemHeight" + android:gravity="center_vertical" + android:clickable="true" + style="?android:attr/borderlessButtonStyle" + android:layout_gravity="center_vertical" /> + + <View + android:layout_width="1dp" + android:layout_height="match_parent" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" + android:background="?android:attr/listDivider" /> + + <TextView + android:id="@+id/certify_fingerprint_button_yes" + android:paddingLeft="8dp" + android:paddingRight="8dp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@string/btn_match" + android:minHeight="?android:attr/listPreferredItemHeight" + android:drawablePadding="8dp" + android:gravity="center_vertical" + android:clickable="true" + style="?android:attr/borderlessButtonStyle" + android:layout_gravity="center_vertical" /> + </LinearLayout> + + <View + android:id="@+id/certify_fingerprint_buttons_divider2" + android:layout_width="match_parent" + android:layout_height="1dip" + android:background="?android:attr/listDivider" + android:layout_alignBottom="@+id/certify_fingerprint_buttons_text" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" /> + + <TextView + android:id="@+id/certify_fingerprint_buttons_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="24dp" + android:layout_marginRight="24dp" + android:paddingTop="8dp" + android:paddingBottom="8dp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:text="@string/certify_fingerprint_text2" + android:layout_above="@+id/certify_fingerprint_buttons" + android:layout_centerHorizontal="true" /> + + <View + android:id="@+id/certify_fingerprint_buttons_divider" + android:layout_width="match_parent" + android:layout_height="1dip" + android:background="?android:attr/listDivider" + android:layout_alignTop="@+id/certify_fingerprint_buttons_text" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" /> + + + +</RelativeLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/create_key_activity.xml b/OpenKeychain/src/main/res/layout/create_key_activity.xml index e8422fb37..c42fd4d4b 100644 --- a/OpenKeychain/src/main/res/layout/create_key_activity.xml +++ b/OpenKeychain/src/main/res/layout/create_key_activity.xml @@ -7,19 +7,15 @@ android:id="@+id/toolbar_include" layout="@layout/toolbar_standalone" /> - <LinearLayout + <FrameLayout android:layout_below="@id/toolbar_include" - android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> - <include layout="@layout/notify_area" /> - <FrameLayout android:id="@+id/create_key_fragment_container" android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical" /> + android:layout_height="match_parent" /> - </LinearLayout> + </FrameLayout> </RelativeLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml b/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml index 189579f91..97eba9cd1 100644 --- a/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml +++ b/OpenKeychain/src/main/res/layout/create_key_final_fragment.xml @@ -159,7 +159,7 @@ android:minHeight="?android:attr/listPreferredItemHeight" android:gravity="center_vertical" android:clickable="true" - style="@style/SelectableItem" + style="?android:attr/borderlessButtonStyle" android:layout_gravity="center_vertical" /> <View @@ -183,7 +183,7 @@ android:drawablePadding="8dp" android:gravity="center_vertical" android:clickable="true" - style="@style/SelectableItem" + style="?android:attr/borderlessButtonStyle" android:layout_gravity="center_vertical" /> </LinearLayout> diff --git a/OpenKeychain/src/main/res/layout/create_key_input_fragment.xml b/OpenKeychain/src/main/res/layout/create_key_input_fragment.xml index d92988111..026d98004 100644 --- a/OpenKeychain/src/main/res/layout/create_key_input_fragment.xml +++ b/OpenKeychain/src/main/res/layout/create_key_input_fragment.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" + android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView @@ -139,7 +139,7 @@ android:drawablePadding="8dp" android:gravity="center_vertical" android:clickable="true" - style="@style/SelectableItem" + style="?android:attr/borderlessButtonStyle" android:layout_gravity="center_vertical" /> </LinearLayout> </RelativeLayout>
\ No newline at end of file diff --git a/OpenKeychain/src/main/res/layout/qr_code_activity.xml b/OpenKeychain/src/main/res/layout/qr_code_activity.xml index 126be4c3a..4ce097f40 100644 --- a/OpenKeychain/src/main/res/layout/qr_code_activity.xml +++ b/OpenKeychain/src/main/res/layout/qr_code_activity.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:card_view="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> @@ -21,16 +20,17 @@ android:layout_margin="32dp" android:layout_width="match_parent" android:layout_height="wrap_content" - card_view:cardBackgroundColor="@android:color/white" - card_view:cardUseCompatPadding="true" - card_view:cardCornerRadius="4dp"> + android:clickable="true" + android:foreground="?android:attr/selectableItemBackground" + app:cardBackgroundColor="@android:color/white" + app:cardUseCompatPadding="true" + app:cardCornerRadius="4dp"> <org.sufficientlysecure.keychain.ui.widget.AspectRatioImageView android:id="@+id/qr_code_image" - app:aspectRatioEnabled="true" android:layout_width="match_parent" android:layout_height="wrap_content" - style="?android:attr/borderlessButtonStyle" /> + app:aspectRatioEnabled="true" /> </android.support.v7.widget.CardView> </LinearLayout> diff --git a/OpenKeychain/src/main/res/layout/view_key_activity.xml b/OpenKeychain/src/main/res/layout/view_key_activity.xml index 7dd30c22c..e2d153e0d 100644 --- a/OpenKeychain/src/main/res/layout/view_key_activity.xml +++ b/OpenKeychain/src/main/res/layout/view_key_activity.xml @@ -101,14 +101,6 @@ android:src="@drawable/ic_action_encrypt_text" /> <ImageButton - android:id="@+id/view_key_action_verify" - android:layout_width="64dp" - android:layout_height="64dp" - android:visibility="invisible" - style="?android:attr/borderlessButtonStyle" - android:src="@drawable/ic_action_verified_cutout" /> - - <ImageButton android:id="@+id/view_key_action_nfc" android:layout_width="64dp" android:layout_height="64dp" @@ -139,15 +131,16 @@ android:layout_marginRight="20dp" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:clickable="true" + android:foreground="?android:attr/selectableItemBackground" card_view:cardBackgroundColor="@android:color/white" card_view:cardUseCompatPadding="true" card_view:cardCornerRadius="4dp"> - <ImageButton + <ImageView android:id="@+id/view_key_qr_code" android:layout_width="96dp" - android:layout_height="96dp" - style="?android:attr/borderlessButtonStyle" /> + android:layout_height="96dp" /> </android.support.v7.widget.CardView> </RelativeLayout> diff --git a/OpenKeychain/src/main/res/menu/key_view.xml b/OpenKeychain/src/main/res/menu/key_view.xml index 86f8ea6a2..c724c46a5 100644 --- a/OpenKeychain/src/main/res/menu/key_view.xml +++ b/OpenKeychain/src/main/res/menu/key_view.xml @@ -31,4 +31,10 @@ app:showAsAction="never" android:title="@string/menu_advanced" /> + <item + android:id="@+id/menu_key_view_certify_fingerprint" + app:showAsAction="never" + android:visible="false" + android:title="@string/menu_certify_fingerprint" /> + </menu>
\ 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 067ce20ea..e4b7cdd20 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -78,6 +78,8 @@ <string name="btn_export_to_server">"Upload To Keyserver"</string> <string name="btn_next">"Next"</string> <string name="btn_back">"Back"</string> + <string name="btn_no">"No"</string> + <string name="btn_match">"Fingerprints are matching"</string> <string name="btn_lookup_key">"Lookup key"</string> <string name="btn_share_encrypted_signed">"Encrypt and share message"</string> <string name="btn_view_cert_key">"View certification key"</string> @@ -107,6 +109,7 @@ <string name="menu_search_cloud">"Search cloud"</string> <string name="menu_export_all_keys">"Export all keys"</string> <string name="menu_advanced">"Show advanced info"</string> + <string name="menu_certify_fingerprint">"Verify via fingerprint comparison"</string> <!-- label --> <string name="label_message">"Message"</string> @@ -1124,6 +1127,8 @@ <string name="certs_text">"Only validated self-certificates and validated certificates created with your keys are displayed here."</string> <string name="section_uids_to_certify">"Identities for "</string> <string name="certify_text">"The keys you are importing contain “identities”: names and emails. Select exactly those for certification which match what you expected."</string> + <string name="certify_fingerprint_text">"Compare the displayed fingerprint, character by character, with the one displayed on your partners device."</string> + <string name="certify_fingerprint_text2">"Do the displayed fingerprints match?"</string> <string name="label_revocation">"Revocation Reason"</string> <string name="label_verify_status">"Verification Status"</string> <string name="label_cert_type">"Type"</string> |