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<FrameLayout 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_dialog" 21 android:orientation="vertical" 22 android:layout_width="@dimen/large_dialog_width" 23 android:layout_height="wrap_content" 24 android:layout_gravity="center_horizontal|bottom" 25 android:paddingLeft="@dimen/dialog_side_padding" 26 android:paddingRight="@dimen/dialog_side_padding"> 27 28 <LinearLayout 29 android:id="@+id/half_shelf" 30 android:layout_width="match_parent" 31 android:layout_height="wrap_content" 32 android:orientation="vertical" 33 android:gravity="bottom" 34 android:layout_gravity="center_horizontal|bottom" 35 android:background="@drawable/rounded_bg_full" > 36 37 <com.android.systemui.statusbar.notification.row.ChannelEditorListView 38 android:id="@+id/half_shelf_container" 39 android:layout_width="match_parent" 40 android:layout_height="wrap_content" 41 android:gravity="bottom" 42 android:orientation="vertical" > 43 44 <com.android.systemui.statusbar.notification.row.AppControlView 45 android:id="@+id/app_control" 46 android:layout_width="match_parent" 47 android:layout_height="wrap_content" 48 android:padding="8dp" 49 android:orientation="horizontal" 50 android:clickable="true" 51 android:foreground="?android:attr/selectableItemBackground" > 52 53 <ImageView 54 android:id="@+id/icon" 55 android:layout_height="48dp" 56 android:layout_width="48dp" 57 android:padding="8dp" /> 58 59 <TextView 60 android:id="@+id/app_name" 61 android:layout_height="wrap_content" 62 android:layout_width="0dp" 63 android:layout_weight="1" 64 android:layout_gravity="center" 65 android:padding="8dp" 66 android:gravity="center_vertical|start" 67 android:ellipsize="end" 68 android:maxLines="2" 69 android:textColor="?androidprv:attr/materialColorOnSurface" 70 android:fontFamily="@*android:string/config_headlineFontFamilyMedium" 71 android:textSize="16sp" 72 /> 73 74 <Switch 75 android:id="@+id/toggle" 76 android:layout_height="48dp" 77 android:layout_width="wrap_content" 78 android:layout_gravity="center_vertical" 79 android:padding="8dp" 80 android:track="@drawable/settingslib_track_selector" 81 android:thumb="@drawable/settingslib_thumb_selector" 82 android:theme="@style/MainSwitch.Settingslib"/> 83 </com.android.systemui.statusbar.notification.row.AppControlView> 84 85 <ScrollView 86 android:layout_width="match_parent" 87 android:layout_height="@dimen/notification_blocker_channel_list_height" 88 android:clipToPadding="false"> 89 <LinearLayout 90 android:id="@+id/scrollView" 91 android:layout_width="match_parent" 92 android:layout_height="wrap_content" 93 android:orientation="vertical"> 94 <!-- ChannelRows get added dynamically --> 95 </LinearLayout> 96 </ScrollView> 97 </com.android.systemui.statusbar.notification.row.ChannelEditorListView> 98 99 <LinearLayout 100 android:id="@+id/bottom_actions" 101 android:layout_width="match_parent" 102 android:layout_height="wrap_content" 103 android:paddingTop="@dimen/notification_guts_button_spacing" 104 android:paddingStart="20dp" 105 android:paddingEnd="20dp" > 106 <TextView 107 android:id="@+id/see_more_button" 108 android:text="@string/see_more_title" 109 android:layout_width="wrap_content" 110 android:layout_height="wrap_content" 111 android:minWidth="@dimen/notification_importance_toggle_size" 112 android:minHeight="@dimen/notification_importance_toggle_size" 113 android:maxWidth="200dp" 114 style="@style/Widget.Dialog.Button"/> 115 <Space 116 android:layout_width="0dp" 117 android:layout_height="match_parent" 118 android:layout_weight="1" /> 119 <TextView 120 android:id="@+id/done_button" 121 android:text="@string/inline_ok_button" 122 android:layout_width="wrap_content" 123 android:layout_height="wrap_content" 124 android:maxWidth="125dp" 125 android:minWidth="@dimen/notification_importance_toggle_size" 126 android:minHeight="@dimen/notification_importance_toggle_size" 127 style="@style/Widget.Dialog.Button"/> 128 </LinearLayout> 129 </LinearLayout> 130</FrameLayout> 131