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:orientation="horizontal" > 24 25 <!-- This is where an icon would go *if we wanted one* **wink** --> 26 <Space 27 android:id="@+id/icon" 28 android:layout_height="48dp" 29 android:layout_width="48dp" 30 android:layout_gravity="center_vertical" 31 android:padding="8dp" 32 /> 33 34 <RelativeLayout 35 android:id="@+id/description_container" 36 android:layout_height="wrap_content" 37 android:layout_width="0dp" 38 android:layout_weight="1" 39 android:layout_gravity="center_vertical" 40 android:gravity="left|center_vertical" 41 android:orientation="vertical" 42 > 43 <TextView 44 android:id="@+id/channel_name" 45 android:layout_height="wrap_content" 46 android:layout_width="wrap_content" 47 android:paddingBottom="0dp" 48 android:paddingStart="8dp" 49 android:paddingEnd="8dp" 50 android:gravity="center_vertical|start" 51 android:textSize="14sp" 52 android:ellipsize="end" 53 android:maxLines="1" 54 style="@style/TextAppearance.NotificationInfo.Title" 55 /> 56 57 <TextView 58 android:id="@+id/channel_description" 59 android:layout_height="wrap_content" 60 android:layout_width="wrap_content" 61 android:paddingStart="8dp" 62 android:paddingEnd="8dp" 63 android:gravity="center_vertical|start" 64 android:textSize="14sp" 65 android:ellipsize="end" 66 android:maxLines="1" 67 android:layout_below="@id/channel_name" 68 style="@style/TextAppearance.NotificationInfo.Secondary" 69 /> 70 </RelativeLayout> 71 72 <Switch 73 android:id="@+id/toggle" 74 android:layout_height="48dp" 75 android:layout_width="wrap_content" 76 android:layout_gravity="center_vertical" 77 android:padding="8dp" 78 /> 79 </com.android.systemui.statusbar.notification.row.ChannelRow> 80