Add Settings for vector-specific PointerIcon stroke colors.
Bug: 305193969 Test: PointerIconLoadingTest Flag: android.view.flags.enable_vector_cursor_a11y_settings Change-Id: I72213e8806fed451a0edb16d497406ffae5c1a44
This commit is contained in:
60
res/layout/pointer_icon_stroke_style_layout.xml
Normal file
60
res/layout/pointer_icon_stroke_style_layout.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright 2024 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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/pointer_stroke_style_padding"
|
||||
android:text="@string/pointer_stroke_style"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/button_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="@dimen/pointer_stroke_style_padding"
|
||||
android:layout_marginBottom="@dimen/pointer_stroke_style_padding"
|
||||
android:padding="@dimen/pointer_stroke_style_padding">
|
||||
<RadioButton android:id="@+id/stroke_style_white"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/pointer_stroke_style_padding"
|
||||
android:text="@string/pointer_stroke_style_name_white"/>
|
||||
<RadioButton android:id="@+id/stroke_style_black"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/pointer_stroke_style_padding"
|
||||
android:text="@string/pointer_stroke_style_name_black"/>
|
||||
<RadioButton android:id="@+id/stroke_style_none"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/pointer_stroke_style_padding"
|
||||
android:text="@string/pointer_stroke_style_name_none"/>
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
@@ -179,6 +179,7 @@
|
||||
<dimen name="pointer_fill_style_circle_padding">8dp</dimen>
|
||||
<dimen name="pointer_fill_style_shape_default_stroke">1dp</dimen>
|
||||
<dimen name="pointer_fill_style_shape_hovered_stroke">3dp</dimen>
|
||||
<dimen name="pointer_stroke_style_padding">8dp</dimen>
|
||||
<dimen name="pointer_scale_padding">8dp</dimen>
|
||||
<item name="pointer_scale_size_start" format="float" type="dimen">1.0</item>
|
||||
<item name="pointer_scale_size_end" format="float" type="dimen">2.5</item>
|
||||
|
@@ -4501,6 +4501,14 @@
|
||||
<string name="pointer_fill_style_pink_button">Change pointer fill style to pink</string>
|
||||
<!-- Content description for blue pointer fill style. [CHAR LIMIT=60] -->
|
||||
<string name="pointer_fill_style_blue_button">Change pointer fill style to blue</string>
|
||||
<!-- Title text for mouse pointer stroke style. [CHAR LIMIT=35] -->
|
||||
<string name="pointer_stroke_style">Pointer stroke style</string>
|
||||
<!-- White value for pointer stroke style. [CHAR LIMIT=35] -->
|
||||
<string name="pointer_stroke_style_name_white">White</string>
|
||||
<!-- Black value pointer stroke style. [CHAR LIMIT=35] -->
|
||||
<string name="pointer_stroke_style_name_black">Black</string>
|
||||
<!-- None value for pointer stroke style. [CHAR LIMIT=35] -->
|
||||
<string name="pointer_stroke_style_name_none">None</string>
|
||||
<!-- Title for the button to trigger the 'touch gesture' education. [CHAR LIMIT=35] -->
|
||||
<string name="trackpad_touch_gesture">Learn touchpad gestures</string>
|
||||
<!-- Search keywords for "touchpad" -->
|
||||
|
@@ -68,6 +68,12 @@
|
||||
android:order="50"
|
||||
settings:controller="com.android.settings.inputmethod.PointerFillStylePreferenceController"/>
|
||||
|
||||
<com.android.settings.inputmethod.PointerStrokeStylePreference
|
||||
android:key="pointer_stroke_style"
|
||||
android:title="@string/pointer_stroke_style"
|
||||
android:order="60"
|
||||
settings:controller="com.android.settings.inputmethod.PointerStrokeStylePreferenceController"/>
|
||||
|
||||
<com.android.settings.widget.LabeledSeekBarPreference
|
||||
android:key="pointer_scale"
|
||||
android:title="@string/pointer_scale"
|
||||
|
Reference in New Issue
Block a user