Files
frameworks_base/packages/SystemUI/res/layout/notification_snooze.xml
Beverly 90e20d3c6d Fix notification snooze a11y issues
- Set minimum height and width on the snooze "undo" button
- Update logic in performAccessibilityActionInternal in
ExpandableNotificationRow so that snoozing a notification from
Talkback/switch access/voice access actually performs the snooze action
- After a user selects a new snooze time option for a notification, the
snooze options close. Focus should remain on the snooze time, since that
element was just changed.
- Once a user snoozes a notification, it should focus on the child
SnoozeView instead of the greater NotificationSnooze view because only
the SnoozeView is actionable. So if focus is requested on the
NotificationSnooze view and the options aren't expanded, then focus just
on the SnoozeView.

Test: manual, use a11y scanner
Fixes: 152730944
Fixes: 152820361
Fixes: 152720315
Fixes: 152718852
Change-Id: I7e43bddfdaa3b5a1741645f7bb54af42bc953fc3

Change-Id: I4672654d4ca2eb2cf68539efb7cfb0c8f5dfb00b
2020-04-13 13:01:12 +00:00

77 lines
3.0 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.notification.row.NotificationSnooze
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@color/notification_material_background_color"
android:theme="@style/Theme.SystemUI">
<RelativeLayout
android:id="@+id/notification_snooze"
android:layout_width="match_parent"
android:layout_height="@dimen/snooze_snackbar_min_height">
<TextView
android:id="@+id/snooze_option_default"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:paddingStart="@*android:dimen/notification_content_margin_start"
android:textColor="?android:attr/textColorPrimary"
android:paddingEnd="4dp"/>
<ImageView
android:id="@+id/expand_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/snooze_option_default"
android:layout_centerVertical="true"
android:paddingTop="1dp"
android:tint="#9E9E9E" />
<TextView
android:id="@+id/undo"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:minWidth="@dimen/min_clickable_item_size"
android:minHeight="@dimen/min_clickable_item_size"
android:text="@string/snooze_undo"
style="@style/TextAppearance.NotificationInfo.Button" />
</RelativeLayout>
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="#9E9E9E" />
<LinearLayout
android:id="@+id/snooze_options"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:orientation="vertical" />
</com.android.systemui.statusbar.notification.row.NotificationSnooze>