blob: 2e35d8673635e382cb396dcdd36c7e11e942200e [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<com.android.systemui.statusbar.NotificationInfo
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/notification_guts"
android:clickable="true"
android:orientation="vertical"
android:paddingStart="@*android:dimen/notification_content_margin_start"
android:background="@color/notification_guts_bg_color"
android:theme="@*android:style/Theme.DeviceDefault.Light">
<!-- Package Info -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@*android:dimen/notification_header_height"
android:clipChildren="false"
android:paddingTop="@*android:dimen/notification_header_padding_top"
android:paddingBottom="@*android:dimen/notification_header_padding_bottom"
android:gravity="center_vertical"
android:orientation="horizontal" >
<ImageView
android:id="@+id/pkgicon"
android:layout_width="@*android:dimen/notification_header_icon_size"
android:layout_height="@*android:dimen/notification_header_icon_size"
android:layout_marginEnd="3dp"/>
<TextView
android:id="@+id/pkgname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
android:layout_marginStart="3dp"
android:layout_marginEnd="2dp"
android:singleLine="true"/>
<TextView
android:id="@+id/pkg_group_divider"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:text="@*android:string/notification_header_divider_symbol"/>
<TextView
android:id="@+id/group_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@*android:style/TextAppearance.Material.Notification.Info"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
android:ellipsize="end"
android:maxLines="1"/>
</LinearLayout>
<!-- Channel Info Block -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginEnd="@*android:dimen/notification_content_margin_end"
android:orientation="vertical">
<!-- Channel Text -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- Channel Name -->
<TextView
android:id="@+id/channel_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginBottom="6dp"
style="@style/TextAppearance.NotificationInfo.Primary" />
<!-- Ban Channel Switch -->
<Switch
android:id="@+id/channel_enabled_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center_vertical"
android:contentDescription="@string/notification_channel_switch_accessibility"
android:background="@null" />
</LinearLayout>
<!-- Secondary Text - only one shows at a time -->
<TextView
android:id="@+id/channel_disabled"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/notification_channel_disabled"
style="@style/TextAppearance.NotificationInfo.Secondary.Warning" />
<TextView
android:id="@+id/num_channels_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/notification_channel_disabled"
style="@style/TextAppearance.NotificationInfo.Secondary" />
<!-- Optional link to app. Only appears if the channel is not disabled -->
<TextView
android:id="@+id/app_settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:ellipsize="end"
android:maxLines="1"
style="@style/TextAppearance.NotificationInfo.Secondary.Link"/>
</LinearLayout>
<!-- Settings and Done buttons -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:orientation="horizontal"
android:gravity="end"
android:layout_marginEnd="@*android:dimen/notification_content_margin_end"
android:layout_marginBottom="8dp" >
<TextView
android:id="@+id/more_settings"
android:text="@string/notification_more_settings"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="8dp"
style="@style/TextAppearance.NotificationInfo.Button"/>
<TextView
android:id="@+id/done"
android:text="@string/notification_done"
android:layout_width="wrap_content"
android:layout_height="match_parent"
style="@style/TextAppearance.NotificationInfo.Button"/>
</LinearLayout>
</com.android.systemui.statusbar.NotificationInfo>