diff options
author | Andreas Straub <andy@strb.org> | 2015-07-19 14:09:49 +0200 |
---|---|---|
committer | Andreas Straub <andy@strb.org> | 2015-07-19 22:24:03 +0200 |
commit | 6f67469bda0ffe97cb8cd8d400affed5a17c34c5 (patch) | |
tree | 613d1076eff9802f4cdb47b8998db69ec688cb14 /src/main/res | |
parent | 9c4d55f82ce50391ac09b4f7d7a0f3576c014e56 (diff) |
Refactor trust key ui and show in account details
Refactored the trust key row UI element so it can be used in multiple
places. It now also uses a slider to toggle the trust state, and the
redundant trust state description was removed.
EditAccountActivity now shows the keys of other devices associated with
that account.
Diffstat (limited to '')
-rw-r--r-- | src/main/res/layout/activity_edit_account.xml | 33 | ||||
-rw-r--r-- | src/main/res/layout/contact_key.xml | 20 | ||||
-rw-r--r-- | src/main/res/values/strings.xml | 2 | ||||
-rw-r--r-- | src/main/res/values/styles.xml | 6 |
4 files changed, 51 insertions, 10 deletions
diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml index df20e6f2..3d65365d 100644 --- a/src/main/res/layout/activity_edit_account.xml +++ b/src/main/res/layout/activity_edit_account.xml @@ -368,7 +368,7 @@ android:layout_height="wrap_content" android:textColor="@color/black54" android:textSize="?attr/TextSizeInfo" - android:text="@string/axolotl_fingerprint"/> + android:text="@string/this_device_axolotl_fingerprint"/> </LinearLayout> <LinearLayout @@ -444,6 +444,37 @@ </RelativeLayout> </LinearLayout> + <LinearLayout + android:id="@+id/other_device_keys_card" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/activity_horizontal_margin" + android:layout_marginRight="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin" + android:layout_marginBottom="@dimen/activity_vertical_margin" + android:background="@drawable/infocard_border" + android:orientation="vertical" + android:padding="@dimen/infocard_padding" + android:visibility="gone"> + + <TextView + android:id="@+id/other_device_keys_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/black87" + android:textSize="?attr/TextSizeHeadline" + android:textStyle="bold" + android:text="@string/other_devices"/> + + <LinearLayout + android:id="@+id/other_device_keys" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:divider="?android:dividerHorizontal" + android:orientation="vertical" + android:showDividers="middle" > + </LinearLayout> + </LinearLayout> </LinearLayout> </ScrollView> diff --git a/src/main/res/layout/contact_key.xml b/src/main/res/layout/contact_key.xml index a43f8083..64f6075c 100644 --- a/src/main/res/layout/contact_key.xml +++ b/src/main/res/layout/contact_key.xml @@ -4,10 +4,10 @@ android:layout_height="match_parent" > <RelativeLayout + android:id="@+id/key_data" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" - android:layout_toLeftOf="@+id/button_remove" android:padding="8dp" > <TextView @@ -16,6 +16,7 @@ android:layout_height="wrap_content" android:textColor="@color/black87" android:layout_alignParentLeft="true" + android:layout_toLeftOf="@+id/tgl_trust" android:textSize="?attr/TextSizeBody" android:typeface="monospace" /> @@ -37,27 +38,28 @@ android:visibility="gone" android:textColor="@color/black54" android:textSize="?attr/TextSizeInfo"/> - </RelativeLayout> <ImageButton android:id="@+id/button_remove" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" + android:layout_toRightOf="@+id/key" android:layout_centerVertical="true" android:background="?android:selectableItemBackground" android:padding="@dimen/image_button_padding" android:src="?attr/icon_remove" - android:visibility="invisible" /> + android:visibility="gone" /> - <ImageButton - android:id="@+id/button_trust" + + <eu.siacs.conversations.ui.widget.Switch + android:id="@+id/tgl_trust" + android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" - android:background="?android:selectableItemBackground" - android:padding="@dimen/image_button_padding" - android:src="?attr/icon_done" - android:visibility="invisible" /> + style="@style/MaterialDesignButton"/> + + </RelativeLayout> </RelativeLayout>
\ No newline at end of file diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 6808f1bb..f4c75ee1 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -209,6 +209,8 @@ <string name="your_fingerprint">Your fingerprint</string> <string name="otr_fingerprint">OTR fingerprint</string> <string name="axolotl_fingerprint">Axolotl fingerprint</string> + <string name="this_device_axolotl_fingerprint">Own Axolotl fingerprint</string> + <string name="other_devices">Other devices</string> <string name="axolotl_devicelist">Other own Axolotl Devices</string> <string name="verify">Verify</string> <string name="decrypt">Decrypt</string> diff --git a/src/main/res/values/styles.xml b/src/main/res/values/styles.xml index e8572d9d..d609b5fb 100644 --- a/src/main/res/values/styles.xml +++ b/src/main/res/values/styles.xml @@ -18,4 +18,10 @@ <item name="android:padding">16dp</item> </style> + <style name="MaterialDesignButton" parent="MD"> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:padding">16dp</item> + </style> + </resources>
\ No newline at end of file |