Merge "Shows ripple inside SettingsSpinner and its dropdown items" into sc-dev am: 1f26477a0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15125792 Change-Id: Ia58b7a9540c84ca7ae0b8184c23762d997fa914e
This commit is contained in:
@@ -15,28 +15,30 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<layer-list
|
<ripple
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:priv-android="http://schemas.android.com/apk/prv/res/android"
|
xmlns:priv-android="http://schemas.android.com/apk/prv/res/android"
|
||||||
android:paddingMode="stack">
|
android:color="@color/ripple_color">
|
||||||
|
|
||||||
<item
|
<item android:id="@android:id/background">
|
||||||
android:top="8dp"
|
<layer-list android:paddingMode="stack">
|
||||||
android:bottom="8dp">
|
<item
|
||||||
<shape>
|
android:top="8dp"
|
||||||
<corners
|
android:bottom="8dp">
|
||||||
android:radius="28dp"/>
|
|
||||||
<solid
|
<shape>
|
||||||
android:color="?priv-android:attr/colorAccentPrimary"/>
|
<corners android:radius="28dp"/>
|
||||||
<size
|
<solid android:color="?priv-android:attr/colorAccentPrimary"/>
|
||||||
android:height="@dimen/spinner_height"/>
|
<size android:height="@dimen/spinner_height"/>
|
||||||
</shape>
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:gravity="center|end"
|
||||||
|
android:width="18dp"
|
||||||
|
android:height="18dp"
|
||||||
|
android:end="8dp"
|
||||||
|
android:drawable="@drawable/arrow_drop_down"/>
|
||||||
|
</layer-list>
|
||||||
</item>
|
</item>
|
||||||
|
</ripple>
|
||||||
<item
|
|
||||||
android:gravity="center|end"
|
|
||||||
android:width="18dp"
|
|
||||||
android:height="18dp"
|
|
||||||
android:end="8dp"
|
|
||||||
android:drawable="@drawable/arrow_drop_down"/>
|
|
||||||
</layer-list>
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (C) 2021 The Android Open Source Project
|
Copyright (C) 2018 The Android Open Source Project
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -15,15 +15,14 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<layer-list
|
<ripple
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:priv-android="http://schemas.android.com/apk/prv/res/android">
|
xmlns:priv-android="http://schemas.android.com/apk/prv/res/android"
|
||||||
|
android:color="@color/ripple_color">
|
||||||
|
|
||||||
<item>
|
<item android:id="@android:id/background">
|
||||||
<shape>
|
<shape>
|
||||||
<solid
|
<solid android:color="?priv-android:attr/colorAccentSecondary"/>
|
||||||
android:color="?priv-android:attr/colorAccentSecondary"/>
|
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
</ripple>
|
||||||
</layer-list>
|
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<color name="ripple_color">@*android:color/material_grey_900</color>
|
||||||
|
</resources>
|
||||||
19
packages/SettingsLib/SettingsSpinner/res/values/colors.xml
Normal file
19
packages/SettingsLib/SettingsSpinner/res/values/colors.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<color name="ripple_color">?android:attr/colorControlHighlight</color>
|
||||||
|
</resources>
|
||||||
Reference in New Issue
Block a user