overhaul advanced subkeys tab

This commit is contained in:
Vincent Breitmoser
2018-07-23 16:57:45 +02:00
parent e08bf89e0f
commit fe387ca4e1
13 changed files with 569 additions and 504 deletions

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#000" android:pathData="M19,15L13,21L11.58,19.58L15.17,16H4V4H6V14H15.17L11.58,10.42L13,9L19,15Z" />
</vector>

View File

@@ -1,46 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal"
android:singleLine="true">
<FrameLayout
android:id="@+id/subkey_item_buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true">
<ImageView
android:id="@+id/subkey_item_edit_image"
android:src="@drawable/ic_mode_edit_grey_24dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp" />
<ImageButton
android:id="@+id/subkey_item_delete_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:src="@drawable/ic_close_grey_24dp"
android:background="?android:selectableItemBackground" />
</FrameLayout>
android:singleLine="true"
android:background="?android:selectableItemBackground">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="8dp"
android:layout_toLeftOf="@+id/subkey_item_status"
android:layout_toStartOf="@+id/subkey_item_status">
android:layout_alignParentStart="true">
<LinearLayout
android:layout_width="match_parent"
@@ -107,7 +84,7 @@
android:layout_weight="1" />
<TextView
android:id="@+id/subkey_item_expiry"
android:id="@+id/subkey_item_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Expiry: 4/7/2016"
@@ -116,17 +93,44 @@
</LinearLayout>
<LinearLayout
android:id="@+id/layout_subkey_action"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone"
tools:visibility="visible">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="6dp"
android:paddingBottom="10dp"
android:src="@drawable/subdir_arrow_right"
/>
<TextView
android:id="@+id/text_subkey_action"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
tools:text="Key will be revoked"
style="?android:textAppearanceMedium"
/>
<ImageButton
android:id="@+id/button_subkey_action_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:src="@drawable/ic_close_grey_24dp"
android:background="?android:selectableItemBackground" />
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/subkey_item_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:src="@drawable/status_signature_revoked_cutout_24dp"
android:paddingLeft="8dp"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/subkey_item_buttons"
android:layout_toStartOf="@+id/subkey_item_buttons" />
</RelativeLayout>

View File

@@ -24,37 +24,12 @@ xmlns:tools="http://schemas.android.com/tools">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/section_keys"
android:layout_weight="1" />
android:text="@string/section_keys" />
<org.sufficientlysecure.keychain.ui.widget.FixedListView
<android.support.v7.widget.RecyclerView
android:id="@+id/view_key_subkeys"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_weight="1"
android:scrollbarStyle="outsideOverlay" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/view_key_subkeys_add_layout"
android:visibility="gone"
tools:visibility="visible">
<View
android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<org.sufficientlysecure.keychain.ui.widget.FixedListView
android:id="@+id/view_key_subkeys_added"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>

View File

@@ -179,6 +179,8 @@
<string name="label_expiry">"Expiry"</string>
<string name="label_valid_from">"Valid from"</string>
<string name="label_usage">"Usage"</string>
<string name="label_revoked">Revoked</string>
<string name="label_insecure">Insecure</string>
<string name="label_key_size">"Key Size"</string>
<string name="label_ecc_curve">"Elliptic Curve"</string>
<string name="label_main_user_id">"Primary identity"</string>
@@ -2056,4 +2058,9 @@
<string name="snack_analytics_accept">"Thanks for helping out! You can change this preference in the settings."</string>
<string name="snack_analytics_reject">"That's alright, we won't ask again. You can change your mind in the settings."</string>
<string name="snackbutton_analytics_settings">"Settings"</string>
<string name="subkey_action_create">Subkey will be created</string>
<string name="subkey_action_revoke">Subkey will be revoked</string>
<string name="subkey_action_strip">Subkey will be stripped</string>
<string name="subkey_action_expiry_never">Expiry will change to never</string>
<string name="subkey_action_expiry_date">Expiry will change to %s</string>
</resources>