account_row.xml

 1<?xml version="1.0" encoding="utf-8"?>
 2<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
 3    android:layout_width="match_parent"
 4    android:layout_height="wrap_content"
 5    android:background="?android:attr/activatedBackgroundIndicator"
 6    android:padding="8dp" >
 7
 8    <ImageView
 9        android:id="@+id/account_image"
10        android:layout_width="48dp"
11        android:layout_height="48dp"
12        android:layout_alignParentLeft="true"
13        android:src="@drawable/ic_profile"
14        android:contentDescription="@string/account_image_description">
15    </ImageView>
16
17    <LinearLayout
18        android:layout_width="fill_parent"
19        android:layout_height="wrap_content"
20        android:layout_centerVertical="true"
21        android:layout_toRightOf="@+id/account_image"
22        android:orientation="vertical"
23        android:paddingLeft="8dp"
24        android:paddingRight="8dp"
25        android:layout_toLeftOf="@+id/tgl_account_status"
26        android:layout_toStartOf="@+id/tgl_account_status">
27
28        <TextView
29            android:id="@+id/account_jid"
30            android:layout_width="wrap_content"
31            android:layout_height="wrap_content"
32            android:scrollHorizontally="false"
33            android:singleLine="true"
34            android:textColor="@color/primarytext"
35            android:textSize="?attr/TextSizeHeadline" />
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:textColor="@color/secondarytext"
43            android:textSize="?attr/TextSizeBody"
44            android:textStyle="bold" />
45    </LinearLayout>
46
47    <Switch
48        android:id="@+id/tgl_account_status"
49        android:layout_width="wrap_content"
50        android:layout_height="wrap_content"
51        android:layout_alignParentRight="true"
52        android:layout_centerVertical="true"
53        android:focusable="false"/>
54
55</RelativeLayout>