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/layout/contact_key.xml | |
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 'src/main/res/layout/contact_key.xml')
-rw-r--r-- | src/main/res/layout/contact_key.xml | 20 |
1 files changed, 11 insertions, 9 deletions
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 |