account_row.xml

 1<?xml version="1.0" encoding="utf-8"?>
 2<layout xmlns:android="http://schemas.android.com/apk/res/android"
 3    xmlns:app="http://schemas.android.com/apk/res-auto">
 4
 5    <FrameLayout
 6        android:background="?selectableItemBackground"
 7        android:layout_width="fill_parent"
 8        android:layout_height="wrap_content">
 9
10    <RelativeLayout
11        android:id="@+id/frame"
12        android:layout_width="match_parent"
13        android:layout_height="wrap_content"
14        android:paddingLeft="8dp"
15        android:paddingBottom="8dp"
16        android:paddingTop="8dp">
17
18        <com.google.android.material.imageview.ShapeableImageView
19            android:id="@+id/account_image"
20            android:layout_width="48dp"
21            android:layout_height="48dp"
22            android:layout_alignParentLeft="true"
23            android:contentDescription="@string/account_image_description"
24            app:strokeColor="@color/custom_theme_accent"
25            app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
26
27        <LinearLayout
28            android:layout_width="fill_parent"
29            android:layout_height="wrap_content"
30            android:layout_centerVertical="true"
31            android:layout_toEndOf="@+id/account_image"
32            android:layout_toRightOf="@+id/account_image"
33            android:orientation="vertical"
34            android:paddingLeft="@dimen/avatar_item_distance"
35            android:layout_toLeftOf="@+id/tgl_account_status"
36            android:layout_toStartOf="@+id/tgl_account_status">
37
38            <TextView
39                android:id="@+id/account_jid"
40                android:layout_width="wrap_content"
41                android:layout_height="wrap_content"
42                android:scrollHorizontally="false"
43                android:singleLine="true"
44                android:textAppearance="@style/TextAppearance.Conversations.Subhead" />
45
46            <LinearLayout
47                android:layout_width="fill_parent"
48                android:layout_height="wrap_content"
49                android:layout_centerVertical="true"
50                android:orientation="horizontal">
51
52               <ImageView
53                    android:id="@+id/verification_indicator"
54                    android:layout_width="?attr/TextSizeCaption"
55                    android:layout_height="?attr/TextSizeCaption"
56                    android:layout_gravity="center_vertical"
57                    android:layout_marginRight="4sp"
58                    android:alpha="0.70"
59                    android:gravity="center_vertical"
60                    android:src="@drawable/shield_question" />
61
62                <TextView
63                    android:id="@+id/account_status"
64                    android:layout_width="wrap_content"
65                    android:layout_height="wrap_content"
66                    android:text="@string/account_status_unknown"
67                    android:textAppearance="@style/TextAppearance.Conversations.Body2" />
68            </LinearLayout>>
69        </LinearLayout>
70
71        <androidx.appcompat.widget.SwitchCompat
72            android:id="@+id/tgl_account_status"
73            android:layout_width="wrap_content"
74            android:layout_height="wrap_content"
75            android:layout_alignParentRight="true"
76            android:layout_centerVertical="true"
77            android:padding="16dp"
78            android:focusable="false" />
79
80    </RelativeLayout>
81    </FrameLayout>
82</layout>