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

Commit e142d9c7 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[Chipbar] Update to material colors.

Note: I removed the common <color> reference because it can't reference
attributes. I added a lint IfChange/ThenChange, which isn't supported by
our linters (yet?) but will at least point people to the other file that
needs to be modified.

Fixes: 267821684
Test: media push to receiver flow w/ app icon (light & dark theme)
Test: media pull to phone flow w/ generic icon (light & dark theme)
Test: active unlock flow (light & dark theme)

Change-Id: I7fcac406a56d71be355d46e180c47a4562f7abff
parent 577441d1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,6 +17,6 @@
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <solid android:color="?androidprv:attr/colorAccentSecondary" />
    <solid android:color="?androidprv:attr/materialColorSecondaryFixed" />
    <corners android:radius="32dp" />
</shape>
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
    android:color="?android:textColorPrimary">
    <item android:id="@android:id/background">
        <shape>
            <solid android:color="@android:color/system_accent1_200"/>
            <solid android:color="?androidprv:attr/materialColorPrimaryFixedDim"/>
            <corners android:radius="24dp" />
        </shape>
    </item>
+5 −3
Original line number Diff line number Diff line
@@ -49,15 +49,17 @@
            android:alpha="0.0"
            />

        <!-- LINT.IfChange textColor -->
        <TextView
            android:id="@+id/text"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            style="@style/Chipbar.Text"
            android:textColor="@color/chipbar_text_and_icon_color"
            android:textColor="?androidprv:attr/materialColorOnSecondaryFixed"
            android:alpha="0.0"
            />
        <!-- LINT.ThenChange(systemui.temporarydisplay.chipbar.ChipbarInfo.kt) -->

        <!-- At most one of [loading, failure_icon, undo] will be visible at a time. -->
        <ImageView
@@ -66,7 +68,7 @@
            android:layout_height="@dimen/chipbar_end_icon_size"
            android:layout_marginStart="@dimen/chipbar_end_item_start_margin"
            android:src="@drawable/ic_progress_activity"
            android:tint="@android:color/system_accent2_700"
            android:tint="?androidprv:attr/materialColorOnSecondaryFixedVariant"
            android:alpha="0.0"
            />

@@ -86,7 +88,7 @@
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/chipbar_end_item_start_margin"
            style="@style/Chipbar.Text"
            android:textColor="?androidprv:attr/textColorOnAccent"
            android:textColor="?androidprv:attr/materialColorOnPrimaryFixed"
            android:paddingStart="@dimen/chipbar_outer_padding"
            android:paddingEnd="@dimen/chipbar_outer_padding"
            android:paddingTop="@dimen/chipbar_end_button_vertical_padding"
+0 −3
Original line number Diff line number Diff line
@@ -231,9 +231,6 @@

    <color name="people_tile_background">@color/material_dynamic_secondary95</color>

    <!-- Chipbar -->
    <color name="chipbar_text_and_icon_color">@android:color/system_accent2_900</color>

    <!-- Internet Dialog -->
    <!-- Material next state on color-->
    <color name="settingslib_state_on_color">@color/settingslib_state_on</color>
+2 −2
Original line number Diff line number Diff line
@@ -16,10 +16,10 @@

package com.android.systemui.common.shared.model

import androidx.annotation.ColorRes
import androidx.annotation.AttrRes

/** Models an icon with a specific tint. */
data class TintedIcon(
    val icon: Icon,
    @ColorRes val tint: Int?,
    @AttrRes val tint: Int?,
)
Loading