Fingerprint verification, design fixes for qr code card

This commit is contained in:
Dominik Schürmann
2015-02-26 02:06:57 +01:00
parent a38f84a401
commit 72acaaa41f
14 changed files with 531 additions and 70 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -100,14 +100,6 @@
style="?android:attr/borderlessButtonStyle"
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"
@@ -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>

View File

@@ -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>

View File

@@ -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>