Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccabc4e8 authored by Lucas Silva's avatar Lucas Silva
Browse files

Update DreamAdapter to set icon tint colors in xml

Setting in xml makes it easier to customize the colors in the SUW vs
normal views.

Bug: 279914654
Test: opened dream settings and verified colors
Change-Id: I367677426b8b538cca19dfdc5d343f66b8f89dba
parent 57094363
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@
            android:textSize="@dimen/dream_item_title_text_size"
            android:textColor="@color/dream_card_text_color_state_list"
            android:drawablePadding="@dimen/dream_item_icon_padding"
            android:drawableTint="@color/dream_card_icon_color_state_list"
            app:layout_constraintTop_toBottomOf="@+id/preview"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
+0 −5
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.settings.dream;
import android.annotation.LayoutRes;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.VectorDrawable;
import android.text.TextUtils;
import android.util.SparseIntArray;
import android.view.LayoutInflater;
@@ -86,10 +85,6 @@ public class DreamAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
            final Drawable icon = item.isActive()
                    ? mContext.getDrawable(R.drawable.ic_dream_check_circle)
                    : item.getIcon().mutate();
            if (icon instanceof VectorDrawable) {
                icon.setTintList(
                        mContext.getColorStateList(R.color.dream_card_icon_color_state_list));
            }
            final int iconSize = mContext.getResources().getDimensionPixelSize(
                    R.dimen.dream_item_icon_size);
            icon.setBounds(0, 0, iconSize, iconSize);