item_channel_discovery.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    xmlns:tools="http://schemas.android.com/tools">
 5
 6    <RelativeLayout
 7        android:layout_width="match_parent"
 8        android:layout_height="wrap_content"
 9        android:background="?selectableItemBackground"
10        android:padding="@dimen/list_padding">
11
12        <com.google.android.material.imageview.ShapeableImageView
13            android:id="@+id/avatar"
14            android:layout_width="48dp"
15            android:layout_height="48dp"
16            android:layout_alignParentStart="true"
17            android:scaleType="centerCrop"
18            app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
19
20        <RelativeLayout
21            android:layout_width="wrap_content"
22            android:layout_height="wrap_content"
23            android:layout_marginStart="@dimen/avatar_item_distance"
24            android:layout_toEndOf="@+id/avatar">
25
26            <TextView
27                android:id="@+id/name"
28                android:layout_width="wrap_content"
29                android:layout_height="wrap_content"
30                android:singleLine="true"
31                android:textAppearance="?textAppearanceTitleMedium"
32                tools:text="Prosody IM chatroom" />
33
34            <TextView
35                android:id="@+id/language"
36                android:layout_width="wrap_content"
37                android:layout_height="wrap_content"
38                android:layout_alignBaseline="@id/name"
39                android:layout_marginStart="8sp"
40                android:layout_toEndOf="@id/name"
41                android:singleLine="true"
42                android:textAppearance="?textAppearanceLabelMedium"
43                tools:text="EN" />
44
45            <TextView
46                android:id="@+id/description"
47                android:layout_width="wrap_content"
48                android:layout_height="wrap_content"
49                android:layout_below="@id/name"
50                android:maxLines="2"
51                android:textAppearance="?textAppearanceBodyMedium"
52                tools:text="Prosody XMPP server support and related discussions (i.e. otters)" />
53
54            <TextView
55                android:id="@+id/room"
56                android:layout_width="wrap_content"
57                android:layout_height="wrap_content"
58                android:layout_below="@id/description"
59                android:maxLines="2"
60                android:textAppearance="?textAppearanceBodyMedium"
61                android:textColor="?colorOnSurfaceVariant"
62                tools:text="prosody@conference.prosody.im" />
63        </RelativeLayout>
64
65    </RelativeLayout>
66</layout>