diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-11-15 20:00:52 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-11-15 20:00:52 +0100 |
commit | 48afeb571bcc2ae1d123ef549426c06e52dc1cc9 (patch) | |
tree | 260cbc35a32346e9a34227fddc019c0fd781bdd9 /src/main/res/layout | |
parent | e84af512729cafa43ed831540d4406e1bb913689 (diff) |
refactor omemo fingerprint UI code
Diffstat (limited to 'src/main/res/layout')
-rw-r--r-- | src/main/res/layout/contact_key.xml | 79 |
1 files changed, 48 insertions, 31 deletions
diff --git a/src/main/res/layout/contact_key.xml b/src/main/res/layout/contact_key.xml index 7076dad2..c16d5e08 100644 --- a/src/main/res/layout/contact_key.xml +++ b/src/main/res/layout/contact_key.xml @@ -1,37 +1,40 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" - android:layout_height="match_parent" > + android:layout_height="match_parent" + android:longClickable="true"> <RelativeLayout android:id="@+id/key_data" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" - android:paddingTop="8dp" + android:paddingBottom="8dp" android:paddingLeft="8dp" - android:paddingBottom="8dp"> + android:paddingTop="8dp"> <TextView android:id="@+id/key" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="?attr/color_text_primary" android:layout_alignParentLeft="true" - android:layout_toLeftOf="@+id/tgl_trust" + android:layout_toLeftOf="@+id/action_container" + android:fontFamily="monospace" + android:textColor="?attr/color_text_primary" android:textSize="?attr/TextSizeBody" android:typeface="monospace" - android:fontFamily="monospace"/> + android:longClickable="true"/> <TextView android:id="@+id/key_type" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="?attr/color_text_secondary" android:layout_alignParentLeft="true" android:layout_below="@+id/key" android:maxLines="1" - android:textSize="?attr/TextSizeInfo"/> + android:textColor="?attr/color_text_secondary" + android:textSize="?attr/TextSizeInfo" + android:longClickable="true"/> <TextView android:id="@+id/key_trust" @@ -39,32 +42,46 @@ android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_below="@+id/key" - android:visibility="gone" android:textColor="?attr/color_text_secondary" - android:textSize="?attr/TextSizeInfo"/> - - <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:alpha="?attr/icon_alpha" - android:src="?attr/icon_remove" - android:visibility="gone" /> + android:textSize="?attr/TextSizeInfo" + android:visibility="gone" + android:longClickable="true"/> + <LinearLayout + android:id="@+id/action_container" + android:layout_width="96dp" + android:layout_marginRight="-32dp" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_alignParentRight="true" + android:layout_centerVertical="true"> + <ImageButton + android:layout_gravity="center_horizontal" + android:id="@+id/button_remove" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:alpha="?attr/icon_alpha" + android:background="?android:selectableItemBackground" + android:padding="@dimen/image_button_padding" + android:src="?attr/icon_remove" + android:layout_marginRight="16dp" + android:visibility="gone" /> + <ImageView + android:visibility="gone" + android:id="@+id/verified_fingerprint" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginRight="16dp" + android:src="@drawable/ic_verified_fingerprint" /> - <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" - style="@style/MD"/> + <eu.siacs.conversations.ui.widget.Switch + android:id="@+id/tgl_trust" + style="@style/MD" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="gone" /> + </LinearLayout> </RelativeLayout> </RelativeLayout>
\ No newline at end of file |