account_row.xml 2.4 KB

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