anotherim/src/main/res/layout/contact_key.xml
Andreas Straub 6f67469bda 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.
2015-07-19 22:24:03 +02:00

65 lines
2.4 KiB
XML

<?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" >
<RelativeLayout
android:id="@+id/key_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:padding="8dp" >
<TextView
android:id="@+id/key"
android:layout_width="wrap_content"
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" />
<TextView
android:id="@+id/key_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black54"
android:layout_alignParentLeft="true"
android:layout_below="@+id/key"
android:textSize="?attr/TextSizeInfo"/>
<TextView
android:id="@+id/key_trust"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/key"
android:visibility="gone"
android:textColor="@color/black54"
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:src="?attr/icon_remove"
android:visibility="gone" />
<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/MaterialDesignButton"/>
</RelativeLayout>
</RelativeLayout>