mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Change the widgets header drawable to be a selector with the state_focused property in addition to the state_expanded property. The focused items are drawn with a focus ring with no ripple, while the unfocused items have a ripple. Bug: 365120324 Test: focus traversal through left widget picker pane Flag: EXEMPT bug fix Change-Id: I710cb9e2d727a061e0c19df15526e8c832f6366b
38 lines
1.6 KiB
XML
38 lines
1.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?><!--
|
|
~ Copyright (C) 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.
|
|
-->
|
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
<!-- Draw the focus ring -->
|
|
<item>
|
|
<shape>
|
|
<corners android:radius="@dimen/widget_focus_ring_corner_radius" />
|
|
<stroke
|
|
android:width="@dimen/widget_header_focus_ring_width"
|
|
android:color="?attr/widgetPickerTabBackgroundSelected" />
|
|
</shape>
|
|
</item>
|
|
|
|
<!-- Draw the background with padding to make it spaced within the focus ring. -->
|
|
<item
|
|
android:bottom="@dimen/widget_header_background_border"
|
|
android:end="@dimen/widget_header_background_border"
|
|
android:start="@dimen/widget_header_background_border"
|
|
android:top="@dimen/widget_header_background_border">
|
|
<shape android:shape="rectangle">
|
|
<corners android:radius="@dimen/widget_list_top_bottom_corner_radius" />
|
|
<solid android:color="?attr/widgetPickerHeaderBackgroundColor" />
|
|
</shape>
|
|
</item>
|
|
</layer-list> |