Merge "Update accesibility button to suuport accessibility gesutre" into sc-v2-dev am: bd41311025
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15085892 Change-Id: I2885e26d6ee4f7e323bf4eccd4f3fa27b608ac70
This commit is contained in:
40
res/drawable/accessibility_button_preview_three_finger.xml
Normal file
40
res/drawable/accessibility_button_preview_three_finger.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2021 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.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="125dp"
|
||||
android:height="153dp"
|
||||
android:viewportWidth="125"
|
||||
android:viewportHeight="153">
|
||||
<path
|
||||
android:pathData="M0,0h125v153h-125z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M41.266,134.754L84.047,134.754A1.735,1.735 0,0 1,85.781 136.489L85.781,136.489A1.735,1.735 0,0 1,84.047 138.223L41.266,138.223A1.735,1.735 0,0 1,39.531 136.489L39.531,136.489A1.735,1.735 0,0 1,41.266 134.754z"
|
||||
android:fillColor="#DADCE0"/>
|
||||
<path
|
||||
android:pathData="M48.359,107L54.719,119.721H50.672V131.87C52.385,132.722 53.563,134.49 53.563,136.533C53.563,139.407 51.233,141.737 48.359,141.737C45.486,141.737 43.156,139.407 43.156,136.533C43.156,134.49 44.333,132.722 46.047,131.87V119.721H42L48.359,107Z"
|
||||
android:fillColor="#1A73E8"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M62.703,107L69.063,119.721H65.016V131.87C66.729,132.722 67.906,134.49 67.906,136.533C67.906,139.407 65.577,141.737 62.703,141.737C59.829,141.737 57.5,139.407 57.5,136.533C57.5,134.49 58.677,132.722 60.39,131.87V119.721H56.344L62.703,107Z"
|
||||
android:fillColor="#1A73E8"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M76.891,107L83.25,119.721H79.203V131.87C80.916,132.722 82.094,134.49 82.094,136.533C82.094,139.407 79.764,141.737 76.891,141.737C74.017,141.737 71.688,139.407 71.688,136.533C71.688,134.49 72.865,132.722 74.578,131.87V119.721H70.531L76.891,107Z"
|
||||
android:fillColor="#1A73E8"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
36
res/drawable/accessibility_button_preview_two_finger.xml
Normal file
36
res/drawable/accessibility_button_preview_two_finger.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2021 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.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="125dp"
|
||||
android:height="153dp"
|
||||
android:viewportWidth="125"
|
||||
android:viewportHeight="153">
|
||||
<path
|
||||
android:pathData="M0,0h125v153h-125z"
|
||||
android:fillColor="#ffffff"/>
|
||||
<path
|
||||
android:pathData="M41.266,134.754L84.047,134.754A1.735,1.735 0,0 1,85.781 136.489L85.781,136.489A1.735,1.735 0,0 1,84.047 138.223L41.266,138.223A1.735,1.735 0,0 1,39.531 136.489L39.531,136.489A1.735,1.735 0,0 1,41.266 134.754z"
|
||||
android:fillColor="#DADCE0"/>
|
||||
<path
|
||||
android:pathData="M52.828,107L59.188,119.721H55.141V131.87C56.854,132.722 58.031,134.49 58.031,136.533C58.031,139.407 55.702,141.737 52.828,141.737C49.954,141.737 47.625,139.407 47.625,136.533C47.625,134.49 48.802,132.722 50.515,131.87V119.721H46.469L52.828,107Z"
|
||||
android:fillColor="#1A73E8"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M70.172,107L76.531,119.721H72.485V131.87C74.198,132.722 75.375,134.49 75.375,136.533C75.375,139.407 73.046,141.737 70.172,141.737C67.298,141.737 64.969,139.407 64.969,136.533C64.969,134.49 66.146,132.722 67.859,131.87V119.721H63.813L70.172,107Z"
|
||||
android:fillColor="#1A73E8"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
@@ -5432,9 +5432,9 @@
|
||||
<!-- Summary text for the accessibility button preference. [CHAR LIMIT=50] -->
|
||||
<string name="accessibility_button_summary">Quickly access accessibility features</string>
|
||||
<!-- Description for the accessibility button in gesture navigation. Explain how this page works. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_button_gesture_description">Quickly access accessibility features from any screen.\n\nTo get started, go to accessibility settings and select a feature. Tap on the shortcut and select the accessibility button.\n\nTo use the accessibility button in the navigation bar instead, switch to 2-button navigation or 3-button navigation.</string>
|
||||
<string name="accessibility_button_gesture_description">Quickly access accessibility features from any screen.\n\nTo get started, go to accessibility settings and select a feature. Tap on the shortcut and select the accessibility button or gesture.</string>
|
||||
<!-- Description for the accessibility button page. Explain how this page works. [CHAR LIMIT=NONE] -->
|
||||
<string name="accessibility_button_description">Quickly access accessibility features from any screen. \n\nTo get started, go to accessibility settings and select a feature. Tap on the shortcut and select the accessibility button.</string>
|
||||
<string name="accessibility_button_description">Quickly access accessibility features from any screen.\n\nTo get started, go to accessibility settings and select a feature. Tap on the shortcut and select the accessibility button.</string>
|
||||
<!-- Title for the button or gesture of the accessibility button. [CHAR LIMIT=35] -->
|
||||
<string name="accessibility_button_or_gesture_title">Use button or gesture</string>
|
||||
<!-- Title for the location of the accessibility button. [CHAR LIMIT=35] -->
|
||||
|
@@ -16,8 +16,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/accessibility_button_title">
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.android.settingslib.widget.LayoutPreference
|
||||
android:key="caption_preview"
|
||||
@@ -37,6 +36,15 @@
|
||||
android:persistent="false"
|
||||
settings:controller="com.android.settings.accessibility.AccessibilityButtonLocationPreferenceController"/>
|
||||
|
||||
<ListPreference
|
||||
android:entries="@array/accessibility_button_gesture_selector_titles"
|
||||
android:entryValues="@array/accessibility_button_gesture_selector_values"
|
||||
android:key="accessibility_button_or_gesture"
|
||||
android:title="@string/accessibility_button_or_gesture_title"
|
||||
android:summary="%s"
|
||||
android:persistent="false"
|
||||
settings:controller="com.android.settings.accessibility.AccessibilityButtonGesturePreferenceController"/>
|
||||
|
||||
<ListPreference
|
||||
android:entries="@array/accessibility_button_size_selector_titles"
|
||||
android:entryValues="@array/accessibility_button_size_selector_values"
|
||||
@@ -61,7 +69,6 @@
|
||||
|
||||
<com.android.settings.accessibility.AccessibilityFooterPreference
|
||||
android:key="accessibility_button_footer"
|
||||
android:title="@string/accessibility_button_description"
|
||||
android:persistent="false"
|
||||
android:selectable="false"
|
||||
settings:searchable="false"
|
||||
|
@@ -25,8 +25,8 @@
|
||||
android:fragment="com.android.settings.accessibility.AccessibilityButtonFragment"
|
||||
android:key="accessibility_button_preference"
|
||||
android:persistent="false"
|
||||
android:title="@string/accessibility_button_title"
|
||||
android:summary="@string/accessibility_button_summary"/>
|
||||
android:summary="@string/accessibility_button_summary"
|
||||
settings:controller="com.android.settings.accessibility.AccessibilityButtonPreferenceController"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="accessibility_shortcut_preference"
|
||||
|
Reference in New Issue
Block a user