Apply proper icon tinting to dream icons

Test: locally on device
Bug: 222754771
Change-Id: I2998a37db4221f6beaeca591532ccc35d0992b86
This commit is contained in:
Lucas Silva
2022-03-04 17:32:16 -05:00
parent a10dc5280d
commit cf7338c1cf
2 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2022 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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
<item android:state_selected="true" android:color="?androidprv:attr/textColorOnAccent"/>
<item android:color="?androidprv:attr/colorAccentPrimaryVariant"/>
</selector>

View File

@@ -91,7 +91,7 @@ public class DreamAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
: item.getIcon();
if (icon instanceof VectorDrawable) {
icon.setTintList(
mContext.getColorStateList(R.color.dream_card_text_color_state_list));
mContext.getColorStateList(R.color.dream_card_icon_color_state_list));
}
final int iconSize = mContext.getResources().getDimensionPixelSize(
R.dimen.dream_item_icon_size);