1<!--
2  ~ Copyright (C) 2019 The Android Open Source Project
3  ~
4  ~ Licensed under the Apache License, Version 2.0 (the "License");
5  ~ you may not use this file except in compliance with the License.
6  ~ You may obtain a copy of the License at
7  ~
8  ~      http://www.apache.org/licenses/LICENSE-2.0
9  ~
10  ~ Unless required by applicable law or agreed to in writing, software
11  ~ distributed under the License is distributed on an "AS IS" BASIS,
12  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  ~ See the License for the specific language governing permissions and
14  ~ limitations under the License
15  -->
16
17<com.android.systemui.statusbar.notification.row.ChannelRow
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    android:id="@+id/half_shelf_row"
20    android:layout_width="match_parent"
21    android:layout_height="wrap_content"
22    android:padding="8dp"
23    android:clickable="true"
24    android:orientation="vertical"
25    android:foreground="?android:attr/selectableItemBackground"
26    >
27
28    <LinearLayout
29        android:layout_width="match_parent"
30        android:layout_height="wrap_content"
31        android:orientation="horizontal">
32
33        <!-- This is where an icon would go *if we wanted one* **wink** -->
34        <Space
35            android:id="@+id/icon"
36            android:layout_height="48dp"
37            android:layout_width="48dp"
38            android:layout_gravity="center_vertical"
39            android:padding="8dp"
40        />
41
42        <RelativeLayout
43            android:id="@+id/description_container"
44            android:layout_height="wrap_content"
45            android:layout_width="0dp"
46            android:layout_weight="1"
47            android:layout_gravity="center_vertical"
48            android:gravity="left|center_vertical"
49            android:orientation="vertical"
50        >
51            <TextView
52                android:id="@+id/channel_name"
53                android:layout_height="wrap_content"
54                android:layout_width="wrap_content"
55                android:paddingBottom="0dp"
56                android:paddingStart="8dp"
57                android:paddingEnd="8dp"
58                android:gravity="center_vertical|start"
59                android:ellipsize="end"
60                android:maxLines="1"
61                android:fontFamily="@*android:string/config_headlineFontFamily"
62                android:textColor="?android:attr/textColorPrimary"
63                android:textSize="16sp"
64            />
65
66            <TextView
67                android:id="@+id/channel_description"
68                android:layout_height="wrap_content"
69                android:layout_width="wrap_content"
70                android:paddingStart="8dp"
71                android:paddingEnd="8dp"
72                android:gravity="center_vertical|start"
73                android:ellipsize="end"
74                android:maxLines="1"
75                android:layout_below="@id/channel_name"
76                android:fontFamily="@*android:string/config_bodyFontFamily"
77                android:textColor="?android:attr/textColorSecondary"
78                android:textSize="14sp"
79            />
80        </RelativeLayout>
81
82        <Switch
83            android:id="@+id/toggle"
84            android:layout_height="48dp"
85            android:layout_width="wrap_content"
86            android:layout_gravity="center_vertical"
87            android:padding="8dp"
88            android:track="@drawable/settingslib_track_selector"
89            android:thumb="@drawable/settingslib_thumb_selector"
90            android:theme="@style/MainSwitch.Settingslib"
91        />
92    </LinearLayout>
93</com.android.systemui.statusbar.notification.row.ChannelRow>
94