Mady Mellor 04d7a0fca0 Add snooze to notification menu row
Moves the snooze plugin code into system UI.
Does not include assistant suggestions.

Test: manual
Change-Id: Ie2c51d65381530c9a72cd8a871efdbf0d63da490
2017-01-25 13:43:09 -08:00

66 lines
2.4 KiB
XML

<?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.NotificationSnooze
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/snooze_snackbar_min_height"
android:id="@+id/notification_snooze"
android:clickable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:background="@color/snooze_snackbar_bg">
<TextView
android:id="@+id/snooze_option_default"
style="@style/TextAppearance.SnoozeSnackBar"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:drawableTint="@android:color/white"
android:drawableEnd="@drawable/notification_expand_more"/>
<android.widget.Space
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"
/>
<TextView
android:id="@+id/undo"
style="@style/TextAppearance.SnoozeSnackBar.Button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:background="@drawable/btn_borderless_rect"
android:layout_gravity="end"
android:text="@string/snooze_undo" />
<LinearLayout
android:id="@+id/snooze_options"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:orientation="vertical"/>
</com.android.systemui.statusbar.NotificationSnooze>