Merge "Adding ripple effect to the "All Apps tab" buttons." into sc-v2-dev am: 3ba95852f3

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16359044

Change-Id: I01ee5a75a82798c002798d91538ecee0d455277b
This commit is contained in:
TreeHugger Robot
2022-02-11 02:25:05 +00:00
committed by Automerger Merge Worker
6 changed files with 43 additions and 36 deletions

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/system_accent1_300"/>
</selector>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#53BCAC"/>
</selector>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/system_accent2_50"/>
</selector>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#CDFAF1"/>
</selector>

View File

@@ -13,23 +13,36 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:enterFadeDuration="100">
<item
android:id="@+id/unselected"
android:state_selected="false">
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/accent_ripple_color">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
<solid android:color="@color/all_apps_tabs_background" />
<solid android:color="@color/accent_ripple_color" />
</shape>
</item>
<item
android:id="@+id/selected"
android:state_selected="true">
<shape android:shape="rectangle">
<corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
<solid android:color="@color/all_apps_tab_background_selected" />
</shape>
<item>
<selector android:enterFadeDuration="100">
<item
android:id="@+id/unselected"
android:state_selected="false">
<shape android:shape="rectangle">
<corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
<solid android:color="@color/all_apps_tabs_background" />
</shape>
</item>
<item
android:id="@+id/selected"
android:state_selected="true">
<shape android:shape="rectangle">
<corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
<solid android:color="@color/all_apps_tab_background_selected" />
</shape>
</item>
</selector>
</item>
</selector>
</ripple>

View File

@@ -1,22 +0,0 @@
<?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.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<shape android:shape="rectangle">
<solid android:color="@android:color/transparent" />
<corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
</shape>
</ripple>