Files
app_Settings/res/layout/wifi_dpp_fragment_header.xml
Arc Wang 70e3580f5d Fix [a11y] Wi-Fi Easy Connect Talkback issues
1. Remove android:contentDescription from ButtonPreference layout file
   'wifi_button_preference_widget.xml' because it should be a more
   general purpose component. Add ButtonPreference#setButtonContentDescription
   for this change.
2. Add a LinearLayout to group title & summary for better Talkback UX
3. Set android:contentDescription for Wi-Fi enrollee scan button
4. setTitle for Talkback actionbar back button of WifiDppQrCodeGeneratorFragment &
   WifiDppQrCodeScannerFragment
5. Auto trigger Talkback to speak title & summary in WifiDppAddDeviceFragment &
   WifiDppChooseSavedWifiNetworkFragment
6. Auto trigger Talkback to speak summary change in WifiDppAddDeviceFragment
7. Auto trigger Talkback to speak error message in WifiDppQrCodeScannerFragment

Bug: 126007405
Bug: 124424996
Bug: 124424445
Test: manual test

Change-Id: I54a3f033bb8871c47be12115ae8f97691fd83302
2019-03-08 12:05:50 +08:00

75 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 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.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/EntityHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<ImageView
android:id="@android:id/icon"
android:layout_width="@dimen/wifi_dpp_fragment_icon_width_height"
android:layout_height="@dimen/wifi_dpp_fragment_icon_width_height"
android:scaleType="fitCenter"/>
<!-- Special header icon only for ic_devices_check_circle_green -->
<ImageView
android:id="@+id/devices_check_circle_green_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_devices_check_circle_green"
android:scaleType="fitCenter"/>
<!-- Add title_summary_container to group content for Talkback -->
<LinearLayout
android:id="@+id/title_summary_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:focusable="true">
<TextView
android:id="@android:id/title"
style="@style/TextAppearance.EntityHeaderTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textAlignment="center"
android:layout_marginTop="8dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"/>
<TextView
android:id="@android:id/summary"
style="@style/TextAppearance.EntityHeaderSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="false"
android:gravity="center_horizontal"
android:textAlignment="center"
android:layout_marginTop="2dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"/>
</LinearLayout>
</LinearLayout>