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="8dp"
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:textColor="?attr/color_text_primary"
36            android:textSize="?attr/TextSizeHeadline" />
37
38        <TextView
39            android:id="@+id/account_status"
40            android:layout_width="wrap_content"
41            android:layout_height="wrap_content"
42            android:text="@string/account_status_unknown"
43            android:textColor="?attr/color_text_secondary"
44            android:textSize="?attr/TextSizeBody"
45            android:textStyle="bold" />
46    </LinearLayout>
47
48    <android.support.v7.widget.SwitchCompat
49        android:id="@+id/tgl_account_status"
50        android:layout_width="wrap_content"
51        android:layout_height="wrap_content"
52        android:layout_alignParentRight="true"
53        android:layout_centerVertical="true"
54        android:padding="16dp"
55        android:focusable="false"/>
56
57</RelativeLayout>