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    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
20    android:id="@+id/half_shelf_row"
21    android:layout_width="match_parent"
22    android:layout_height="wrap_content"
23    android:padding="8dp"
24    android:clickable="true"
25    android:orientation="vertical"
26    android:foreground="?android:attr/selectableItemBackground"
27    >
28
29    <LinearLayout
30        android:layout_width="match_parent"
31        android:layout_height="wrap_content"
32        android:orientation="horizontal">
33
34        <!-- This is where an icon would go *if we wanted one* **wink** -->
35        <Space
36            android:id="@+id/icon"
37            android:layout_height="48dp"
38            android:layout_width="48dp"
39            android:layout_gravity="center_vertical"
40            android:padding="8dp"
41        />
42
43        <RelativeLayout
44            android:id="@+id/description_container"
45            android:layout_height="wrap_content"
46            android:layout_width="0dp"
47            android:layout_weight="1"
48            android:layout_gravity="center_vertical"
49            android:gravity="left|center_vertical"
50            android:orientation="vertical"
51        >
52            <TextView
53                android:id="@+id/channel_name"
54                android:layout_height="wrap_content"
55                android:layout_width="wrap_content"
56                android:paddingBottom="0dp"
57                android:paddingStart="8dp"
58                android:paddingEnd="8dp"
59                android:gravity="center_vertical|start"
60                android:ellipsize="end"
61                android:maxLines="1"
62                android:fontFamily="@*android:string/config_headlineFontFamily"
63                android:textColor="?androidprv:attr/materialColorOnSurface"
64                android:textSize="16sp"
65            />
66
67            <TextView
68                android:id="@+id/channel_description"
69                android:layout_height="wrap_content"
70                android:layout_width="wrap_content"
71                android:paddingStart="8dp"
72                android:paddingEnd="8dp"
73                android:gravity="center_vertical|start"
74                android:ellipsize="end"
75                android:maxLines="1"
76                android:layout_below="@id/channel_name"
77                android:fontFamily="@*android:string/config_bodyFontFamily"
78                android:textColor="?androidprv:attr/materialColorOnSurfaceVariant"
79                android:textSize="14sp"
80            />
81        </RelativeLayout>
82
83        <Switch
84            android:id="@+id/toggle"
85            android:layout_height="48dp"
86            android:layout_width="wrap_content"
87            android:layout_gravity="center_vertical"
88            android:padding="8dp"
89            android:track="@drawable/settingslib_track_selector"
90            android:thumb="@drawable/settingslib_thumb_selector"
91            android:theme="@style/MainSwitch.Settingslib"
92        />
93    </LinearLayout>
94</com.android.systemui.statusbar.notification.row.ChannelRow>
95