account_row.xml

 1<?xml version="1.0" encoding="utf-8"?>
 2<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
 3                xmlns:app="http://schemas.android.com/apk/res-auto"
 4                android:layout_width="match_parent"
 5                android:layout_height="wrap_content"
 6                android:background="?android:attr/activatedBackgroundIndicator"
 7                android:paddingLeft="8dp"
 8                android:paddingBottom="8dp"
 9                android:paddingTop="8dp">
10
11    <com.makeramen.roundedimageview.RoundedImageView
12        android:id="@+id/account_image"
13        android:layout_width="48dp"
14        android:layout_height="48dp"
15        android:layout_alignParentLeft="true"
16        android:contentDescription="@string/account_image_description"
17        app:riv_corner_radius="2dp" />
18
19    <LinearLayout
20        android:layout_width="fill_parent"
21        android:layout_height="wrap_content"
22        android:layout_centerVertical="true"
23        android:layout_toRightOf="@+id/account_image"
24        android:orientation="vertical"
25        android:paddingLeft="@dimen/avatar_item_distance"
26        android:layout_toLeftOf="@+id/tgl_account_status"
27        android:layout_toStartOf="@+id/tgl_account_status">
28
29        <TextView
30            android:id="@+id/account_jid"
31            android:layout_width="wrap_content"
32            android:layout_height="wrap_content"
33            android:scrollHorizontally="false"
34            android:singleLine="true"
35            android:textAppearance="@style/TextAppearance.Conversations.Subhead"/>
36
37        <TextView
38            android:id="@+id/account_status"
39            android:layout_width="wrap_content"
40            android:layout_height="wrap_content"
41            android:text="@string/account_status_unknown"
42            android:textAppearance="@style/TextAppearance.Conversations.Body2"
43             />
44    </LinearLayout>
45
46    <android.support.v7.widget.SwitchCompat
47        android:id="@+id/tgl_account_status"
48        android:layout_width="wrap_content"
49        android:layout_height="wrap_content"
50        android:layout_alignParentRight="true"
51        android:layout_centerVertical="true"
52        android:padding="16dp"
53        android:focusable="false"/>
54
55</RelativeLayout>