diff options
Diffstat (limited to 'OpenKeychain/src/main/res/layout/view_key_fragment.xml')
-rw-r--r-- | OpenKeychain/src/main/res/layout/view_key_fragment.xml | 368 |
1 files changed, 26 insertions, 342 deletions
diff --git a/OpenKeychain/src/main/res/layout/view_key_fragment.xml b/OpenKeychain/src/main/res/layout/view_key_fragment.xml index 790d4143e..d37a41236 100644 --- a/OpenKeychain/src/main/res/layout/view_key_fragment.xml +++ b/OpenKeychain/src/main/res/layout/view_key_fragment.xml @@ -1,358 +1,42 @@ <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:card_view="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> - <!-- focusable and related properties to workaround http://stackoverflow.com/q/16182331--> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:focusable="true" - android:focusableInTouchMode="true" - android:descendantFocusability="beforeDescendants" android:orientation="vertical" + android:paddingTop="16dp" android:paddingLeft="16dp" android:paddingRight="16dp"> - <TextView - style="@style/SectionHeader" - android:layout_width="wrap_content" - android:layout_height="0dp" - android:layout_marginTop="8dp" - android:text="@string/section_user_ids" - android:layout_weight="1" /> - - <org.sufficientlysecure.keychain.ui.widget.FixedListView - android:id="@+id/view_key_user_ids" - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_marginBottom="4dp" - android:layout_weight="1" /> - - <TextView - style="@style/SectionHeader" - android:layout_width="wrap_content" - android:layout_height="0dp" - android:layout_marginTop="14dp" - android:text="@string/section_actions" - android:layout_weight="1" /> - - <LinearLayout - android:id="@+id/view_key_action_certify" - android:layout_width="match_parent" - android:layout_height="?android:attr/listPreferredItemHeight" - android:clickable="true" - android:paddingRight="4dp" - style="@style/SelectableItem" - android:orientation="horizontal"> - - <TextView - android:id="@+id/view_key_action_certify_text" - android:paddingLeft="8dp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_width="0dip" - android:layout_height="match_parent" - android:text="@string/key_view_action_certify" - android:layout_weight="1" - android:gravity="center_vertical" /> - - <ImageView - android:id="@+id/view_key_action_certify_image" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:padding="8dp" - android:src="@drawable/status_signature_verified_cutout_24px" - android:layout_gravity="center_vertical" /> - - </LinearLayout> - - <View - android:id="@+id/view_key_action_certify_divider" - android:layout_width="match_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" /> - - <TextView - android:id="@+id/view_key_action_edit" - android:paddingLeft="8dp" - android:paddingRight="8dp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?android:attr/listPreferredItemHeight" - android:clickable="true" - style="@style/SelectableItem" - android:text="@string/key_view_action_edit" - android:layout_weight="1" - android:drawableRight="@drawable/ic_action_edit" - android:drawablePadding="8dp" - android:gravity="center_vertical" /> - - <View - android:id="@+id/view_key_action_edit_divider" - android:layout_width="match_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" /> - - - <LinearLayout - android:id="@+id/view_key_action_encrypt_text" - android:layout_width="match_parent" - android:layout_height="?android:attr/listPreferredItemHeight" - android:clickable="true" - style="@style/SelectableItem" - android:orientation="horizontal"> - - <TextView - android:id="@+id/view_key_action_encrypt_text_text" - android:paddingLeft="8dp" - android:paddingRight="8dp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_width="0dip" - android:layout_height="match_parent" - android:text="@string/key_view_action_encrypt" - android:layout_weight="1" - android:drawableRight="@drawable/ic_action_secure" - android:drawablePadding="8dp" - android:gravity="center_vertical" /> - - <View - android:layout_width="1dip" - android:layout_height="match_parent" - android:gravity="right" - android:layout_marginBottom="8dp" - android:layout_marginTop="8dp" - android:background="?android:attr/listDivider" /> - - <TextView - android:id="@+id/view_key_action_encrypt_files" - android:paddingLeft="8dp" - android:paddingRight="8dp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:text="@string/key_view_action_encrypt_files" - android:drawableRight="@drawable/ic_action_secure" - android:drawablePadding="8dp" - android:gravity="center_vertical" - style="@style/SelectableItem" /> - - </LinearLayout> - - <View - android:layout_width="match_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" /> - - <TextView - android:id="@+id/view_key_action_update" - android:paddingLeft="8dp" - android:paddingRight="8dp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?android:attr/listPreferredItemHeight" - android:clickable="true" - style="@style/SelectableItem" - android:text="@string/key_view_action_update" - android:layout_weight="1" - android:drawableRight="@drawable/ic_action_download" - android:drawablePadding="8dp" - android:gravity="center_vertical" /> - - - <TextView - style="@style/SectionHeader" - android:layout_width="wrap_content" - android:layout_height="0dp" - android:layout_marginTop="8dp" - android:text="@string/section_fingerprint" - android:layout_weight="1" /> - - <LinearLayout - android:id="@+id/view_key_action_fingerprint_share" + <android.support.v7.widget.CardView + android:id="@+id/card_view" + android:layout_gravity="center" android:layout_width="match_parent" - android:layout_height="?android:attr/listPreferredItemHeight" - android:clickable="true" - style="@style/SelectableItem" - android:orientation="horizontal"> - - <TextView - android:id="@+id/view_key_fingerprint" - android:paddingLeft="8dp" - android:paddingRight="8dp" - android:textAppearance="?android:attr/textAppearanceSmall" - android:layout_width="0dip" - android:layout_height="match_parent" - android:text="" - android:layout_weight="1" - android:typeface="monospace" - android:drawableRight="@drawable/ic_action_share" - android:drawablePadding="8dp" - android:gravity="center_vertical" /> - - <View - android:layout_width="1dip" - android:layout_height="match_parent" - android:gravity="right" - android:layout_marginBottom="8dp" - android:layout_marginTop="8dp" - android:background="?android:attr/listDivider" /> - - <ImageButton - android:id="@+id/view_key_action_fingerprint_clipboard" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:padding="8dp" - android:src="@drawable/ic_action_copy" - android:layout_gravity="center_vertical" - style="@style/SelectableItem" /> - - </LinearLayout> - - <View - android:layout_width="match_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" /> - - <ImageView - android:id="@+id/view_key_fingerprint_qr_code_image" - android:paddingTop="8dp" - android:paddingBottom="8dp" - android:layout_width="200dp" android:layout_height="200dp" - android:layout_gravity="center_horizontal" - android:layout_weight="1" - style="@style/SelectableItem" /> - - <TextView - style="@style/SectionHeader" - android:layout_width="wrap_content" - android:layout_height="0dp" - android:layout_marginTop="14dp" - android:text="@string/section_share_key" - android:layout_weight="1" /> - - <LinearLayout - android:id="@+id/view_key_action_key_share" - android:layout_width="match_parent" - android:layout_height="?android:attr/listPreferredItemHeight" - android:clickable="true" - style="@style/SelectableItem" - android:orientation="horizontal"> - - <TextView - android:paddingLeft="8dp" - android:paddingRight="8dp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_width="0dip" - android:layout_height="match_parent" - android:text="@string/key_view_action_share_with" - android:layout_weight="1" - android:drawableRight="@drawable/ic_action_share" - android:drawablePadding="8dp" - android:gravity="center_vertical" /> - - <View - android:layout_width="1dip" - android:layout_height="match_parent" - android:gravity="right" - android:layout_marginBottom="8dp" - android:layout_marginTop="8dp" - android:background="?android:attr/listDivider" /> - - <ImageButton - android:id="@+id/view_key_action_key_clipboard" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:padding="8dp" - android:src="@drawable/ic_action_copy" - android:layout_gravity="center_vertical" - style="@style/SelectableItem" /> - - <View - android:layout_width="1dip" - android:layout_height="match_parent" - android:gravity="right" - android:layout_marginBottom="8dp" - android:layout_marginTop="8dp" - android:background="?android:attr/listDivider" /> - - <ImageButton - android:id="@+id/view_key_action_key_safeslinger" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:padding="8dp" - android:src="@drawable/ic_action_safeslinger" - android:layout_gravity="center_vertical" - style="@style/SelectableItem" /> - - </LinearLayout> - - <View - android:layout_width="match_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" /> - - <TextView - android:id="@+id/view_key_action_upload" - android:paddingLeft="8dp" - android:paddingRight="8dp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="?android:attr/listPreferredItemHeight" - android:clickable="true" - style="@style/SelectableItem" - android:text="@string/key_view_action_upload" - android:layout_weight="1" - android:drawableRight="@drawable/ic_action_upload" - android:drawablePadding="8dp" - android:gravity="center_vertical" /> - - <View - android:layout_width="match_parent" - android:layout_height="1dip" - android:background="?android:attr/listDivider" /> - - <LinearLayout - android:id="@+id/view_key_action_nfc_help" - android:layout_width="match_parent" - android:layout_height="?android:attr/listPreferredItemHeight" - android:clickable="true" - style="@style/SelectableItem" - android:orientation="horizontal" - android:layout_marginBottom="8dp"> - - <TextView - android:paddingLeft="8dp" - android:paddingRight="8dp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_width="0dip" - android:layout_height="match_parent" - android:text="@string/key_view_action_share_nfc" - android:layout_weight="1" - android:drawableRight="@drawable/ic_action_help" - android:drawablePadding="8dp" - android:gravity="center_vertical" /> - - <View - android:layout_width="1dip" - android:layout_height="match_parent" - android:gravity="right" - android:layout_marginBottom="8dp" - android:layout_marginTop="8dp" - android:background="?android:attr/listDivider" /> - - <ImageButton - android:id="@+id/view_key_action_nfc_prefs" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:padding="8dp" - android:src="@drawable/ic_action_settings" - android:layout_gravity="center_vertical" - style="@style/SelectableItem" /> - - </LinearLayout> + card_view:cardCornerRadius="4dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + style="@style/SectionHeader" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="@string/section_user_ids" /> + + <org.sufficientlysecure.keychain.ui.widget.FixedListView + android:id="@+id/view_key_user_ids" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="4dp" /> + </LinearLayout> + </android.support.v7.widget.CardView> </LinearLayout> |