Commit | Line | Data |
---|---|---|
5db0f233 | 1 | From 7fdff8fb9ed8a74716788356ccc6ccf9fb85439f Mon Sep 17 00:00:00 2001 |
5d2287a1 L |
2 | From: bigrushdog <randall.rushing@gmail.com> |
3 | Date: Tue, 11 Apr 2017 01:01:04 -0700 | |
5db0f233 | 4 | Subject: [PATCH 48/52] Separate tile label color from icon drawable color |
5d2287a1 L |
5 | |
6 | Sometimes it is desirable to override default icon tinting with | |
7 | transparent tinting. However, doing so makes the label text | |
8 | invisible. Allow themes to specify their own label color in this | |
9 | case. | |
10 | ||
11 | Change-Id: I9af2002929e41144469050a864c0eca243e32339 | |
12 | --- | |
13 | packages/SystemUI/res/values/projekt_colors.xml | 2 ++ | |
14 | packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java | 3 ++- | |
15 | 2 files changed, 4 insertions(+), 1 deletion(-) | |
16 | ||
17 | diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml | |
18 | index 84e3b75505b..8fd3fc3039d 100644 | |
19 | --- a/packages/SystemUI/res/values/projekt_colors.xml | |
20 | +++ b/packages/SystemUI/res/values/projekt_colors.xml | |
21 | @@ -37,4 +37,6 @@ | |
22 | <!-- Screenshot action colors --> | |
23 | <color name="screenshot_flash_color">@android:color/white</color> | |
24 | <color name="screenshot_background_color">@android:color/black</color> | |
25 | + <!-- Separate QS text label tint from icon tint --> | |
26 | + <color name="qs_tile_label_tint_unavailable">@color/qs_tile_tint_unavailable</color> | |
27 | </resources> | |
28 | diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java b/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java | |
29 | index dfd2b77f7e7..5d1958ea25d 100644 | |
30 | --- a/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java | |
31 | +++ b/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java | |
32 | @@ -307,7 +307,8 @@ public class CustomTile extends QSTile<QSTile.State> implements TileChangeListen | |
33 | state.label = mTile.getLabel(); | |
34 | if (tileState == Tile.STATE_UNAVAILABLE) { | |
35 | state.label = new SpannableStringBuilder().append(state.label, | |
36 | - new ForegroundColorSpan(color), | |
37 | + new ForegroundColorSpan( | |
38 | + mContext.getColor(R.color.qs_tile_label_tint_unavailable)), | |
39 | SpannableStringBuilder.SPAN_INCLUSIVE_INCLUSIVE); | |
40 | } | |
41 | if (mTile.getContentDescription() != null) { | |
42 | -- | |
43 | 2.11.1 | |
44 |