Merge "Add Settings for vector-specific PointerIcon fill colors." into main

This commit is contained in:
Treehugger Robot
2024-06-07 16:31:59 +00:00
committed by Android (Google) Code Review
7 changed files with 376 additions and 0 deletions

View File

@@ -0,0 +1,102 @@
<?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_fill_style_circle_padding"
android:text="@string/pointer_fill_style"
android:textAlignment="viewStart"
android:textAppearance="?android:attr/textAppearanceListItem" />
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/button_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/pointer_fill_style_circle_padding"
android:layout_marginTop="@dimen/pointer_fill_style_circle_padding"
android:background="@drawable/pointer_icon_fill_style_background"
android:gravity="center_horizontal"
android:padding="@dimen/pointer_fill_style_circle_padding">
<ImageView
android:id="@+id/button_black"
android:layout_width="@dimen/pointer_fill_style_circle_diameter"
android:layout_height="@dimen/pointer_fill_style_circle_diameter"
android:layout_margin="@dimen/pointer_fill_style_circle_padding"
android:adjustViewBounds="true"
android:maxWidth="@dimen/pointer_fill_style_circle_diameter"
android:contentDescription="@string/pointer_fill_style_black_button"
android:scaleType="fitCenter" />
<ImageView
android:id="@+id/button_green"
android:layout_width="@dimen/pointer_fill_style_circle_diameter"
android:layout_height="@dimen/pointer_fill_style_circle_diameter"
android:layout_margin="@dimen/pointer_fill_style_circle_padding"
android:adjustViewBounds="true"
android:maxWidth="@dimen/pointer_fill_style_circle_diameter"
android:contentDescription="@string/pointer_fill_style_green_button"
android:scaleType="fitCenter" />
<ImageView
android:id="@+id/button_yellow"
android:layout_width="@dimen/pointer_fill_style_circle_diameter"
android:layout_height="@dimen/pointer_fill_style_circle_diameter"
android:layout_margin="@dimen/pointer_fill_style_circle_padding"
android:adjustViewBounds="true"
android:maxWidth="@dimen/pointer_fill_style_circle_diameter"
android:contentDescription="@string/pointer_fill_style_yellow_button"
android:scaleType="fitCenter" />
<ImageView
android:id="@+id/button_pink"
android:layout_width="@dimen/pointer_fill_style_circle_diameter"
android:layout_height="@dimen/pointer_fill_style_circle_diameter"
android:layout_margin="@dimen/pointer_fill_style_circle_padding"
android:adjustViewBounds="true"
android:maxWidth="@dimen/pointer_fill_style_circle_diameter"
android:contentDescription="@string/pointer_fill_style_pink_button"
android:scaleType="fitCenter" />
<ImageView
android:id="@+id/button_blue"
android:layout_width="@dimen/pointer_fill_style_circle_diameter"
android:layout_height="@dimen/pointer_fill_style_circle_diameter"
android:layout_margin="@dimen/pointer_fill_style_circle_padding"
android:adjustViewBounds="true"
android:maxWidth="@dimen/pointer_fill_style_circle_diameter"
android:contentDescription="@string/pointer_fill_style_blue_button"
android:scaleType="fitCenter" />
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>