1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 Copyright 2014, The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16 --> 17 18 <com.android.systemui.statusbar.NotificationGuts 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 android:layout_width="match_parent" 21 android:layout_height="wrap_content" 22 android:id="@+id/notification_guts" 23 android:visibility="gone" 24 android:clickable="true" 25 android:gravity="top|start" 26 android:orientation="vertical" 27 android:paddingStart="@*android:dimen/notification_content_margin_start" 28 android:paddingEnd="8dp" 29 android:background="@color/notification_guts_bg_color" 30 android:theme="@*android:style/Theme.DeviceDefault.Light"> 31 32 <!-- header --> 33 <LinearLayout 34 android:layout_width="match_parent" 35 android:layout_height="wrap_content" 36 android:paddingTop="15dp" 37 android:paddingEnd="8dp" 38 android:id="@+id/notification_guts_header" 39 android:orientation="horizontal" 40 android:layout_gravity="start"> 41 42 <ImageView 43 android:id="@+id/app_icon" 44 android:layout_width="18dp" 45 android:layout_height="18dp" 46 android:layout_marginEnd="6dp" 47 android:src="@android:drawable/arrow_down_float" /> 48 <TextView 49 android:id="@+id/pkgname" 50 android:layout_width="wrap_content" 51 android:layout_height="wrap_content" 52 style="@style/TextAppearance.NotificationGuts.Header" /> 53 <TextView 54 android:layout_width="wrap_content" 55 android:layout_height="wrap_content" 56 android:id="@+id/debug_info" 57 android:layout_weight="0" 58 style="@style/TextAppearance.NotificationGuts.Header" 59 android:layout_gravity="bottom|start" 60 android:visibility="gone" /> 61 </LinearLayout> 62 <!-- Importance radio buttons --> 63 <RadioGroup 64 android:id="@+id/importance_buttons" 65 android:layout_width="match_parent" 66 android:layout_height="wrap_content" 67 android:paddingStart="3dp" 68 android:paddingTop="4dp" 69 android:paddingEnd="8dp" > 70 <RadioButton 71 android:id="@+id/silent_importance" 72 android:layout_width="wrap_content" 73 android:layout_height="40dp" 74 android:paddingStart="22dp" 75 android:text="@string/show_silently" 76 style="@style/TextAppearance.NotificationGuts.Radio" 77 android:buttonTint="@color/notification_guts_buttons" /> 78 <RadioButton 79 android:id="@+id/block_importance" 80 android:layout_width="wrap_content" 81 android:layout_height="40dp" 82 android:paddingStart="22dp" 83 android:text="@string/block" 84 style="@style/TextAppearance.NotificationGuts.Radio" 85 android:buttonTint="@color/notification_guts_buttons" /> 86 <RadioButton 87 android:id="@+id/reset_importance" 88 android:layout_width="wrap_content" 89 android:layout_height="40dp" 90 android:paddingStart="22dp" 91 style="@style/TextAppearance.NotificationGuts.Radio" 92 android:buttonTint="@color/notification_guts_buttons" /> 93 </RadioGroup> 94 <!-- When neither blocking or silencing is available --> 95 <TextView 96 android:id="@+id/cant_silence_or_block" 97 android:layout_width="match_parent" 98 android:layout_height="48dp" 99 android:gravity="center_vertical" 100 style="@style/TextAppearance.NotificationGuts.Radio" 101 android:text="@string/cant_silence_or_block" 102 android:visibility="gone" 103 /> 104 <!-- Importance slider --> 105 <LinearLayout 106 android:id="@+id/importance_slider" 107 android:layout_width="match_parent" 108 android:layout_height="wrap_content" 109 android:gravity="center_vertical" 110 android:orientation="vertical" 111 android:clickable="false" 112 android:focusable="false" 113 android:paddingEnd="8dp" 114 android:paddingTop="4dp" 115 android:visibility="gone"> 116 <TextView 117 android:id="@+id/title" 118 android:layout_width="match_parent" 119 android:layout_height="wrap_content" 120 android:singleLine="true" 121 style="@style/TextAppearance.NotificationGuts.Primary" 122 android:ellipsize="marquee" 123 android:fadingEdge="horizontal" 124 android:paddingBottom="2dp"/> 125 126 <TextView 127 android:id="@+id/summary" 128 android:layout_width="match_parent" 129 android:layout_height="wrap_content" 130 android:layout_alignStart="@android:id/title" 131 android:textAlignment="viewStart" 132 style="@style/TextAppearance.NotificationGuts.Secondary" 133 android:maxLines="3" 134 android:minLines="2" 135 android:paddingBottom="4dp" /> 136 137 <FrameLayout 138 android:layout_width="match_parent" 139 android:layout_height="wrap_content" 140 android:paddingTop="8dp" > 141 142 <ImageView 143 android:id="@+id/auto_importance" 144 android:src="@drawable/notification_auto_importance" 145 android:layout_gravity="center_vertical|start" 146 android:layout_width="48dp" 147 android:layout_height="48dp" /> 148 149 <SeekBar 150 android:id="@+id/seekbar" 151 android:layout_marginStart="56dp" 152 android:layout_marginEnd="32dp" 153 android:layout_gravity="center_vertical" 154 android:layout_width="match_parent" 155 android:layout_height="48dp" 156 android:focusable="true" 157 android:background="#00ffffff" 158 android:progressBackgroundTint="@color/notification_guts_secondary_slider_color" 159 android:thumbTint="?android:attr/colorAccent" 160 android:progressTint="?android:attr/colorAccent" 161 style="@android:style/Widget.Material.SeekBar.Discrete" 162 android:tickMarkTint="@android:color/black" /> 163 164 </FrameLayout> 165 </LinearLayout> 166 <!-- buttons --> 167 <LinearLayout 168 android:layout_width="match_parent" 169 android:layout_height="wrap_content" 170 android:gravity="end" 171 android:paddingTop="16dp" 172 android:paddingBottom="8dp" > 173 174 <TextView 175 android:id="@+id/more_settings" 176 android:text="@string/notification_more_settings" 177 android:layout_width="wrap_content" 178 android:layout_height="36dp" 179 style="@style/TextAppearance.NotificationGuts.Button" 180 android:background="@drawable/btn_borderless_rect" 181 android:gravity="center" 182 android:paddingEnd="8dp" 183 android:paddingStart="8dp" 184 android:focusable="true" /> 185 186 <TextView 187 android:id="@+id/done" 188 android:text="@string/notification_done" 189 android:layout_width="wrap_content" 190 android:layout_height="36dp" 191 style="@style/TextAppearance.NotificationGuts.Button" 192 android:background="@drawable/btn_borderless_rect" 193 android:gravity="center" 194 android:layout_marginStart="8dp" 195 android:layout_marginEnd="8dp" 196 android:focusable="true"/> 197 </LinearLayout> 198 </com.android.systemui.statusbar.NotificationGuts> 199