• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:color/materialColorOnSurface"
70                    android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
71                    android:textSize="16sp"
72                />
73
74                <com.google.android.material.materialswitch.MaterialSwitch
75                    android:theme="@style/Theme.Material3.DynamicColors.DayNight"
76                    android:id="@+id/material_toggle"
77                    android:filterTouchesWhenObscured="false"
78                    android:clickable="true"
79                    android:focusable="true"
80                    android:padding="8dp"
81                    android:layout_height="48dp"
82                    android:layout_width="wrap_content"
83                    android:layout_gravity="center_vertical"
84                    style="@style/SettingslibSwitchStyle.Expressive"/>
85
86            </com.android.systemui.statusbar.notification.row.AppControlView>
87
88            <ScrollView
89                android:layout_width="match_parent"
90                android:layout_height="@dimen/notification_blocker_channel_list_height"
91                android:clipToPadding="false">
92                <LinearLayout
93                    android:id="@+id/scrollView"
94                    android:layout_width="match_parent"
95                    android:layout_height="wrap_content"
96                    android:orientation="vertical">
97                    <!-- ChannelRows get added dynamically -->
98                </LinearLayout>
99            </ScrollView>
100        </com.android.systemui.statusbar.notification.row.ChannelEditorListView>
101
102        <LinearLayout
103            android:id="@+id/bottom_actions"
104            android:layout_width="match_parent"
105            android:layout_height="wrap_content"
106            android:paddingTop="@dimen/notification_guts_button_spacing"
107            android:paddingStart="20dp"
108            android:paddingEnd="20dp" >
109            <TextView
110                android:id="@+id/see_more_button"
111                android:text="@string/see_more_title"
112                android:layout_width="wrap_content"
113                android:layout_height="wrap_content"
114                android:minWidth="@dimen/notification_importance_toggle_size"
115                android:minHeight="@dimen/notification_importance_toggle_size"
116                android:maxWidth="200dp"
117                style="@style/Widget.Dialog.Button"/>
118            <Space
119                android:layout_width="0dp"
120                android:layout_height="match_parent"
121                android:layout_weight="1" />
122            <TextView
123                android:id="@+id/done_button"
124                android:text="@string/inline_ok_button"
125                android:layout_width="wrap_content"
126                android:layout_height="wrap_content"
127                android:maxWidth="125dp"
128                android:minWidth="@dimen/notification_importance_toggle_size"
129                android:minHeight="@dimen/notification_importance_toggle_size"
130                style="@style/Widget.Dialog.Button"/>
131        </LinearLayout>
132    </LinearLayout>
133</FrameLayout>
134