Merge "Update system palette APIs" into sc-dev
This commit is contained in:
@@ -1729,42 +1729,66 @@ package android {
|
||||
field @Deprecated public static final int secondary_text_dark_nodisable = 17170438; // 0x1060006
|
||||
field @Deprecated public static final int secondary_text_light = 17170439; // 0x1060007
|
||||
field @Deprecated public static final int secondary_text_light_nodisable = 17170440; // 0x1060008
|
||||
field public static final int system_neutral_0 = 17170485; // 0x1060035
|
||||
field public static final int system_neutral_100 = 17170487; // 0x1060037
|
||||
field public static final int system_neutral_1000 = 17170496; // 0x1060040
|
||||
field public static final int system_neutral_200 = 17170488; // 0x1060038
|
||||
field public static final int system_neutral_300 = 17170489; // 0x1060039
|
||||
field public static final int system_neutral_400 = 17170490; // 0x106003a
|
||||
field public static final int system_neutral_50 = 17170486; // 0x1060036
|
||||
field public static final int system_neutral_500 = 17170491; // 0x106003b
|
||||
field public static final int system_neutral_600 = 17170492; // 0x106003c
|
||||
field public static final int system_neutral_700 = 17170493; // 0x106003d
|
||||
field public static final int system_neutral_800 = 17170494; // 0x106003e
|
||||
field public static final int system_neutral_900 = 17170495; // 0x106003f
|
||||
field public static final int system_primary_0 = 17170461; // 0x106001d
|
||||
field public static final int system_primary_100 = 17170463; // 0x106001f
|
||||
field public static final int system_primary_1000 = 17170472; // 0x1060028
|
||||
field public static final int system_primary_200 = 17170464; // 0x1060020
|
||||
field public static final int system_primary_300 = 17170465; // 0x1060021
|
||||
field public static final int system_primary_400 = 17170466; // 0x1060022
|
||||
field public static final int system_primary_50 = 17170462; // 0x106001e
|
||||
field public static final int system_primary_500 = 17170467; // 0x1060023
|
||||
field public static final int system_primary_600 = 17170468; // 0x1060024
|
||||
field public static final int system_primary_700 = 17170469; // 0x1060025
|
||||
field public static final int system_primary_800 = 17170470; // 0x1060026
|
||||
field public static final int system_primary_900 = 17170471; // 0x1060027
|
||||
field public static final int system_secondary_0 = 17170473; // 0x1060029
|
||||
field public static final int system_secondary_100 = 17170475; // 0x106002b
|
||||
field public static final int system_secondary_1000 = 17170484; // 0x1060034
|
||||
field public static final int system_secondary_200 = 17170476; // 0x106002c
|
||||
field public static final int system_secondary_300 = 17170477; // 0x106002d
|
||||
field public static final int system_secondary_400 = 17170478; // 0x106002e
|
||||
field public static final int system_secondary_50 = 17170474; // 0x106002a
|
||||
field public static final int system_secondary_500 = 17170479; // 0x106002f
|
||||
field public static final int system_secondary_600 = 17170480; // 0x1060030
|
||||
field public static final int system_secondary_700 = 17170481; // 0x1060031
|
||||
field public static final int system_secondary_800 = 17170482; // 0x1060032
|
||||
field public static final int system_secondary_900 = 17170483; // 0x1060033
|
||||
field public static final int system_accent1_0 = 17170485; // 0x1060035
|
||||
field public static final int system_accent1_100 = 17170487; // 0x1060037
|
||||
field public static final int system_accent1_1000 = 17170496; // 0x1060040
|
||||
field public static final int system_accent1_200 = 17170488; // 0x1060038
|
||||
field public static final int system_accent1_300 = 17170489; // 0x1060039
|
||||
field public static final int system_accent1_400 = 17170490; // 0x106003a
|
||||
field public static final int system_accent1_50 = 17170486; // 0x1060036
|
||||
field public static final int system_accent1_500 = 17170491; // 0x106003b
|
||||
field public static final int system_accent1_600 = 17170492; // 0x106003c
|
||||
field public static final int system_accent1_700 = 17170493; // 0x106003d
|
||||
field public static final int system_accent1_800 = 17170494; // 0x106003e
|
||||
field public static final int system_accent1_900 = 17170495; // 0x106003f
|
||||
field public static final int system_accent2_0 = 17170497; // 0x1060041
|
||||
field public static final int system_accent2_100 = 17170499; // 0x1060043
|
||||
field public static final int system_accent2_1000 = 17170508; // 0x106004c
|
||||
field public static final int system_accent2_200 = 17170500; // 0x1060044
|
||||
field public static final int system_accent2_300 = 17170501; // 0x1060045
|
||||
field public static final int system_accent2_400 = 17170502; // 0x1060046
|
||||
field public static final int system_accent2_50 = 17170498; // 0x1060042
|
||||
field public static final int system_accent2_500 = 17170503; // 0x1060047
|
||||
field public static final int system_accent2_600 = 17170504; // 0x1060048
|
||||
field public static final int system_accent2_700 = 17170505; // 0x1060049
|
||||
field public static final int system_accent2_800 = 17170506; // 0x106004a
|
||||
field public static final int system_accent2_900 = 17170507; // 0x106004b
|
||||
field public static final int system_accent3_0 = 17170509; // 0x106004d
|
||||
field public static final int system_accent3_100 = 17170511; // 0x106004f
|
||||
field public static final int system_accent3_1000 = 17170520; // 0x1060058
|
||||
field public static final int system_accent3_200 = 17170512; // 0x1060050
|
||||
field public static final int system_accent3_300 = 17170513; // 0x1060051
|
||||
field public static final int system_accent3_400 = 17170514; // 0x1060052
|
||||
field public static final int system_accent3_50 = 17170510; // 0x106004e
|
||||
field public static final int system_accent3_500 = 17170515; // 0x1060053
|
||||
field public static final int system_accent3_600 = 17170516; // 0x1060054
|
||||
field public static final int system_accent3_700 = 17170517; // 0x1060055
|
||||
field public static final int system_accent3_800 = 17170518; // 0x1060056
|
||||
field public static final int system_accent3_900 = 17170519; // 0x1060057
|
||||
field public static final int system_neutral1_0 = 17170461; // 0x106001d
|
||||
field public static final int system_neutral1_100 = 17170463; // 0x106001f
|
||||
field public static final int system_neutral1_1000 = 17170472; // 0x1060028
|
||||
field public static final int system_neutral1_200 = 17170464; // 0x1060020
|
||||
field public static final int system_neutral1_300 = 17170465; // 0x1060021
|
||||
field public static final int system_neutral1_400 = 17170466; // 0x1060022
|
||||
field public static final int system_neutral1_50 = 17170462; // 0x106001e
|
||||
field public static final int system_neutral1_500 = 17170467; // 0x1060023
|
||||
field public static final int system_neutral1_600 = 17170468; // 0x1060024
|
||||
field public static final int system_neutral1_700 = 17170469; // 0x1060025
|
||||
field public static final int system_neutral1_800 = 17170470; // 0x1060026
|
||||
field public static final int system_neutral1_900 = 17170471; // 0x1060027
|
||||
field public static final int system_neutral2_0 = 17170473; // 0x1060029
|
||||
field public static final int system_neutral2_100 = 17170475; // 0x106002b
|
||||
field public static final int system_neutral2_1000 = 17170484; // 0x1060034
|
||||
field public static final int system_neutral2_200 = 17170476; // 0x106002c
|
||||
field public static final int system_neutral2_300 = 17170477; // 0x106002d
|
||||
field public static final int system_neutral2_400 = 17170478; // 0x106002e
|
||||
field public static final int system_neutral2_50 = 17170474; // 0x106002a
|
||||
field public static final int system_neutral2_500 = 17170479; // 0x106002f
|
||||
field public static final int system_neutral2_600 = 17170480; // 0x1060030
|
||||
field public static final int system_neutral2_700 = 17170481; // 0x1060031
|
||||
field public static final int system_neutral2_800 = 17170482; // 0x1060032
|
||||
field public static final int system_neutral2_900 = 17170483; // 0x1060033
|
||||
field public static final int tab_indicator_text = 17170441; // 0x1060009
|
||||
field @Deprecated public static final int tertiary_text_dark = 17170448; // 0x1060010
|
||||
field @Deprecated public static final int tertiary_text_light = 17170449; // 0x1060011
|
||||
|
||||
@@ -841,8 +841,8 @@ public class AppWidgetHostView extends FrameLayout {
|
||||
* Calling this method will trigger a full re-inflation of the App Widget.
|
||||
*
|
||||
* The color resources that can be overloaded are the ones whose name is prefixed with
|
||||
* {@code system_primary_}, {@code system_secondary_} or {@code system_neutral_}, for example
|
||||
* {@link android.R.color#system_primary_500}.
|
||||
* {@code system_neutral} or {@code system_accent}, for example
|
||||
* {@link android.R.color#system_neutral1_500}.
|
||||
*/
|
||||
public void setColorResources(@NonNull SparseIntArray colorMapping) {
|
||||
mColorResources = RemoteViews.ColorResources.create(mContext, colorMapping);
|
||||
|
||||
@@ -5476,14 +5476,14 @@ public class RemoteViews implements Parcelable, Filter {
|
||||
/**
|
||||
* Object allowing the modification of a context to overload the system's dynamic colors.
|
||||
*
|
||||
* Only colors from {@link android.R.color#system_primary_0} to
|
||||
* {@link android.R.color#system_neutral_1000} can be overloaded.
|
||||
* Only colors from {@link android.R.color#system_accent1_0} to
|
||||
* {@link android.R.color#system_neutral2_1000} can be overloaded.
|
||||
* @hide
|
||||
*/
|
||||
public static final class ColorResources {
|
||||
// Set of valid colors resources.
|
||||
private static final int FIRST_RESOURCE_COLOR_ID = android.R.color.system_primary_0;
|
||||
private static final int LAST_RESOURCE_COLOR_ID = android.R.color.system_neutral_1000;
|
||||
private static final int FIRST_RESOURCE_COLOR_ID = android.R.color.system_neutral1_0;
|
||||
private static final int LAST_RESOURCE_COLOR_ID = android.R.color.system_accent3_1000;
|
||||
// Size, in bytes, of an entry in the array of colors in an ARSC file.
|
||||
private static final int ARSC_ENTRY_SIZE = 16;
|
||||
|
||||
|
||||
@@ -1,40 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Note: the values of the colors doesn't really matter (they will always be overwritten before used), but they help a lot debugging, to find out which color is where in the ARSC file. -->
|
||||
<color name="system_primary_0">#01010101</color>
|
||||
<color name="system_primary_50">#02020202</color>
|
||||
<color name="system_primary_100">#03030303</color>
|
||||
<color name="system_primary_200">#04040404</color>
|
||||
<color name="system_primary_300">#05050505</color>
|
||||
<color name="system_primary_400">#06060606</color>
|
||||
<color name="system_primary_500">#07070707</color>
|
||||
<color name="system_primary_600">#08080808</color>
|
||||
<color name="system_primary_700">#09090909</color>
|
||||
<color name="system_primary_800">#0a0a0a0a</color>
|
||||
<color name="system_primary_900">#0b0b0b0b</color>
|
||||
<color name="system_primary_1000">#0c0c0c0c</color>
|
||||
<color name="system_secondary_0">#10101010</color>
|
||||
<color name="system_secondary_50">#20202020</color>
|
||||
<color name="system_secondary_100">#30303030</color>
|
||||
<color name="system_secondary_200">#40404040</color>
|
||||
<color name="system_secondary_300">#50505050</color>
|
||||
<color name="system_secondary_400">#60606060</color>
|
||||
<color name="system_secondary_500">#70707070</color>
|
||||
<color name="system_secondary_600">#80808080</color>
|
||||
<color name="system_secondary_700">#90909090</color>
|
||||
<color name="system_secondary_800">#a0a0a0a0</color>
|
||||
<color name="system_secondary_900">#b0b0b0b0</color>
|
||||
<color name="system_secondary_1000">#c0c0c0c0</color>
|
||||
<color name="system_neutral_0">#1f1f1f1f</color>
|
||||
<color name="system_neutral_50">#2f2f2f2f</color>
|
||||
<color name="system_neutral_100">#3f3f3f3f</color>
|
||||
<color name="system_neutral_200">#4f4f4f4f</color>
|
||||
<color name="system_neutral_300">#5f5f5f5f</color>
|
||||
<color name="system_neutral_400">#6f6f6f6f</color>
|
||||
<color name="system_neutral_500">#7f7f7f7f</color>
|
||||
<color name="system_neutral_600">#8f8f8f8f</color>
|
||||
<color name="system_neutral_700">#9f9f9f9f</color>
|
||||
<color name="system_neutral_800">#afafafaf</color>
|
||||
<color name="system_neutral_900">#bfbfbfbf</color>
|
||||
<color name="system_neutral_1000">#cfcfcfcf</color>
|
||||
<color name="system_accent1_0">#ffffff</color>
|
||||
<color name="system_accent1_50">#91fff4</color>
|
||||
<color name="system_accent1_100">#83f6e5</color>
|
||||
<color name="system_accent1_200">#65d9c9</color>
|
||||
<color name="system_accent1_300">#45bdae</color>
|
||||
<color name="system_accent1_400">#1fa293</color>
|
||||
<color name="system_accent1_500">#008377</color>
|
||||
<color name="system_accent1_600">#006d61</color>
|
||||
<color name="system_accent1_700">#005449</color>
|
||||
<color name="system_accent1_800">#003c33</color>
|
||||
<color name="system_accent1_900">#00271e</color>
|
||||
<color name="system_accent1_1000">#000000</color>
|
||||
<color name="system_accent2_0">#ffffff</color>
|
||||
<color name="system_accent2_50">#91fff4</color>
|
||||
<color name="system_accent2_100">#83f6e5</color>
|
||||
<color name="system_accent2_200">#65d9c9</color>
|
||||
<color name="system_accent2_300">#45bdae</color>
|
||||
<color name="system_accent2_400">#1fa293</color>
|
||||
<color name="system_accent2_500">#008377</color>
|
||||
<color name="system_accent2_600">#006d61</color>
|
||||
<color name="system_accent2_700">#005449</color>
|
||||
<color name="system_accent2_800">#003c33</color>
|
||||
<color name="system_accent2_900">#00271e</color>
|
||||
<color name="system_accent2_1000">#000000</color>
|
||||
<color name="system_accent3_0">#ffffff</color>
|
||||
<color name="system_accent3_50">#91fff4</color>
|
||||
<color name="system_accent3_100">#83f6e5</color>
|
||||
<color name="system_accent3_200">#65d9c9</color>
|
||||
<color name="system_accent3_300">#45bdae</color>
|
||||
<color name="system_accent3_400">#1fa293</color>
|
||||
<color name="system_accent3_500">#008377</color>
|
||||
<color name="system_accent3_600">#006d61</color>
|
||||
<color name="system_accent3_700">#005449</color>
|
||||
<color name="system_accent3_800">#003c33</color>
|
||||
<color name="system_accent3_900">#00271e</color>
|
||||
<color name="system_accent3_1000">#000000</color>
|
||||
<color name="system_neutral1_0">#ffffff</color>
|
||||
<color name="system_neutral1_50">#f0f0f0</color>
|
||||
<color name="system_neutral1_100">#e2e2e2</color>
|
||||
<color name="system_neutral1_200">#c6c6c6</color>
|
||||
<color name="system_neutral1_300">#ababab</color>
|
||||
<color name="system_neutral1_400">#909090</color>
|
||||
<color name="system_neutral1_500">#757575</color>
|
||||
<color name="system_neutral1_600">#5e5e5e</color>
|
||||
<color name="system_neutral1_700">#464646</color>
|
||||
<color name="system_neutral1_800">#303030</color>
|
||||
<color name="system_neutral1_900">#1b1b1b</color>
|
||||
<color name="system_neutral1_1000">#000000</color>
|
||||
<color name="system_neutral2_0">#ffffff</color>
|
||||
<color name="system_neutral2_50">#f0f0f0</color>
|
||||
<color name="system_neutral2_100">#e2e2e2</color>
|
||||
<color name="system_neutral2_200">#c6c6c6</color>
|
||||
<color name="system_neutral2_300">#ababab</color>
|
||||
<color name="system_neutral2_400">#909090</color>
|
||||
<color name="system_neutral2_500">#757575</color>
|
||||
<color name="system_neutral2_600">#5e5e5e</color>
|
||||
<color name="system_neutral2_700">#464646</color>
|
||||
<color name="system_neutral2_800">#303030</color>
|
||||
<color name="system_neutral2_900">#1b1b1b</color>
|
||||
<color name="system_neutral2_1000">#000000</color>
|
||||
</resources>
|
||||
|
||||
@@ -1,41 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<public-group type="color" first-id="0x0106001d">
|
||||
<public name="system_primary_0" />
|
||||
<public name="system_primary_50" />
|
||||
<public name="system_primary_100" />
|
||||
<public name="system_primary_200" />
|
||||
<public name="system_primary_300" />
|
||||
<public name="system_primary_400" />
|
||||
<public name="system_primary_500" />
|
||||
<public name="system_primary_600" />
|
||||
<public name="system_primary_700" />
|
||||
<public name="system_primary_800" />
|
||||
<public name="system_primary_900" />
|
||||
<public name="system_primary_1000" />
|
||||
<public name="system_secondary_0" />
|
||||
<public name="system_secondary_50" />
|
||||
<public name="system_secondary_100" />
|
||||
<public name="system_secondary_200" />
|
||||
<public name="system_secondary_300" />
|
||||
<public name="system_secondary_400" />
|
||||
<public name="system_secondary_500" />
|
||||
<public name="system_secondary_600" />
|
||||
<public name="system_secondary_700" />
|
||||
<public name="system_secondary_800" />
|
||||
<public name="system_secondary_900" />
|
||||
<public name="system_secondary_1000" />
|
||||
<public name="system_neutral_0" />
|
||||
<public name="system_neutral_50" />
|
||||
<public name="system_neutral_100" />
|
||||
<public name="system_neutral_200" />
|
||||
<public name="system_neutral_300" />
|
||||
<public name="system_neutral_400" />
|
||||
<public name="system_neutral_500" />
|
||||
<public name="system_neutral_600" />
|
||||
<public name="system_neutral_700" />
|
||||
<public name="system_neutral_800" />
|
||||
<public name="system_neutral_900" />
|
||||
<public name="system_neutral_1000" />
|
||||
<public name="system_accent1_0" />
|
||||
<public name="system_accent1_50" />
|
||||
<public name="system_accent1_100" />
|
||||
<public name="system_accent1_200" />
|
||||
<public name="system_accent1_300" />
|
||||
<public name="system_accent1_400" />
|
||||
<public name="system_accent1_500" />
|
||||
<public name="system_accent1_600" />
|
||||
<public name="system_accent1_700" />
|
||||
<public name="system_accent1_800" />
|
||||
<public name="system_accent1_900" />
|
||||
<public name="system_accent1_1000" />
|
||||
<public name="system_accent2_0" />
|
||||
<public name="system_accent2_50" />
|
||||
<public name="system_accent2_100" />
|
||||
<public name="system_accent2_200" />
|
||||
<public name="system_accent2_300" />
|
||||
<public name="system_accent2_400" />
|
||||
<public name="system_accent2_500" />
|
||||
<public name="system_accent2_600" />
|
||||
<public name="system_accent2_700" />
|
||||
<public name="system_accent2_800" />
|
||||
<public name="system_accent2_900" />
|
||||
<public name="system_accent2_1000" />
|
||||
<public name="system_accent3_0" />
|
||||
<public name="system_accent3_50" />
|
||||
<public name="system_accent3_100" />
|
||||
<public name="system_accent3_200" />
|
||||
<public name="system_accent3_300" />
|
||||
<public name="system_accent3_400" />
|
||||
<public name="system_accent3_500" />
|
||||
<public name="system_accent3_600" />
|
||||
<public name="system_accent3_700" />
|
||||
<public name="system_accent3_800" />
|
||||
<public name="system_accent3_900" />
|
||||
<public name="system_accent3_1000" />
|
||||
<public name="system_neutral1_0" />
|
||||
<public name="system_neutral1_50" />
|
||||
<public name="system_neutral1_100" />
|
||||
<public name="system_neutral1_200" />
|
||||
<public name="system_neutral1_300" />
|
||||
<public name="system_neutral1_400" />
|
||||
<public name="system_neutral1_500" />
|
||||
<public name="system_neutral1_600" />
|
||||
<public name="system_neutral1_700" />
|
||||
<public name="system_neutral1_800" />
|
||||
<public name="system_neutral1_900" />
|
||||
<public name="system_neutral1_1000" />
|
||||
<public name="system_neutral2_0" />
|
||||
<public name="system_neutral2_50" />
|
||||
<public name="system_neutral2_100" />
|
||||
<public name="system_neutral2_200" />
|
||||
<public name="system_neutral2_300" />
|
||||
<public name="system_neutral2_400" />
|
||||
<public name="system_neutral2_500" />
|
||||
<public name="system_neutral2_600" />
|
||||
<public name="system_neutral2_700" />
|
||||
<public name="system_neutral2_800" />
|
||||
<public name="system_neutral2_900" />
|
||||
<public name="system_neutral2_1000" />
|
||||
</public-group>
|
||||
</resources>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<!-- Please see primary_text_material_dark.xml -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false"
|
||||
android:alpha="?attr/disabledAlpha"
|
||||
android:color="@color/system_primary_50"/>
|
||||
<item android:color="@color/system_primary_50"/>
|
||||
android:color="@color/system_neutral1_500"/>
|
||||
<item android:color="@color/system_neutral1_50"/>
|
||||
</selector>
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
<!-- Please see primary_text_material_light.xml -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false"
|
||||
android:alpha="?attr/disabledAlpha"
|
||||
android:color="@color/system_primary_900"/>
|
||||
<item android:color="@color/system_primary_900"/>
|
||||
android:color="@color/system_neutral1_400"/>
|
||||
<item android:color="@color/system_neutral1_900"/>
|
||||
</selector>
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false"
|
||||
android:alpha="?attr/disabledAlpha"
|
||||
android:color="@color/system_primary_200"/>
|
||||
<item android:color="@color/system_primary_200"/>
|
||||
android:color="@color/system_neutral2_200"/>
|
||||
<item android:color="@color/system_neutral2_200"/>
|
||||
</selector>
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false"
|
||||
android:alpha="?attr/disabledAlpha"
|
||||
android:color="@color/system_primary_700"/>
|
||||
<item android:color="@color/system_primary_700"/>
|
||||
android:color="@color/system_neutral2_700"/>
|
||||
<item android:color="@color/system_neutral2_700"/>
|
||||
</selector>
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false"
|
||||
android:alpha="?attr/disabledAlpha"
|
||||
android:color="@color/system_primary_400"/>
|
||||
<item android:color="@color/system_primary_400"/>
|
||||
android:color="@color/system_neutral2_400"/>
|
||||
<item android:color="@color/system_neutral2_400"/>
|
||||
</selector>
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false"
|
||||
android:alpha="?attr/disabledAlpha"
|
||||
android:color="@color/system_primary_500"/>
|
||||
<item android:color="@color/system_primary_500"/>
|
||||
android:color="@color/system_neutral2_500"/>
|
||||
<item android:color="@color/system_neutral2_500"/>
|
||||
</selector>
|
||||
|
||||
@@ -244,114 +244,188 @@
|
||||
|
||||
<color name="conversation_important_highlight">#F9AB00</color>
|
||||
|
||||
<!-- Lightest shade of the primary color used by the system. White.
|
||||
<!-- Lightest shade of the accent color used by the system. White.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_0">#ffffff</color>
|
||||
<!-- Shade of the primary system color at 95% lightness.
|
||||
<color name="system_accent1_0">#ffffff</color>
|
||||
<!-- Shade of the accent system color at 95% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_50">#f2f2f2</color>
|
||||
<!-- Shade of the primary system color at 90% lightness.
|
||||
<color name="system_accent1_50">#91fff4</color>
|
||||
<!-- Shade of the accent system color at 90% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_100">#e3e3e3</color>
|
||||
<!-- Shade of the primary system color at 80% lightness.
|
||||
<color name="system_accent1_100">#83f6e5</color>
|
||||
<!-- Shade of the accent system color at 80% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_200">#c7c7c7</color>
|
||||
<!-- Shade of the primary system color at 70% lightness.
|
||||
<color name="system_accent1_200">#65d9c9</color>
|
||||
<!-- Shade of the accent system color at 70% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_300">#ababab</color>
|
||||
<!-- Shade of the primary system color at 60% lightness.
|
||||
<color name="system_accent1_300">#45bdae</color>
|
||||
<!-- Shade of the accent system color at 60% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_400">#8f8f8f</color>
|
||||
<!-- Shade of the primary system color at 50% lightness.
|
||||
<color name="system_accent1_400">#1fa293</color>
|
||||
<!-- Shade of the accent system color at 49% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_500">#757575</color>
|
||||
<!-- Shade of the primary system color at 40% lightness.
|
||||
<color name="system_accent1_500">#008377</color>
|
||||
<!-- Shade of the accent system color at 40% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_600">#5e5e5e</color>
|
||||
<!-- Shade of the primary system color at 30% lightness.
|
||||
<color name="system_accent1_600">#006d61</color>
|
||||
<!-- Shade of the accent system color at 30% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_700">#474747</color>
|
||||
<!-- Shade of the primary system color at 20% lightness.
|
||||
<color name="system_accent1_700">#005449</color>
|
||||
<!-- Shade of the accent system color at 20% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_800">#303030</color>
|
||||
<!-- Shade of the primary system color at 10% lightness.
|
||||
<color name="system_accent1_800">#003c33</color>
|
||||
<!-- Shade of the accent system color at 10% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_900">#1f1f1f</color>
|
||||
<!-- Darkest shade of the primary color used by the system. Black.
|
||||
<color name="system_accent1_900">#00271e</color>
|
||||
<!-- Darkest shade of the accent color used by the system. Black.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_primary_1000">#000000</color>
|
||||
<color name="system_accent1_1000">#000000</color>
|
||||
|
||||
<!-- Lightest shade of the secondary color used by the system. White.
|
||||
<!-- Lightest shade of the secondary accent color used by the system. White.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_0">#ffffff</color>
|
||||
<!-- Shade of the secondary system color at 95% lightness.
|
||||
<color name="system_accent2_0">#ffffff</color>
|
||||
<!-- Shade of the secondary accent system color at 95% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_50">#91fff4</color>
|
||||
<!-- Shade of the secondary system color at 90% lightness.
|
||||
<color name="system_accent2_50">#91fff4</color>
|
||||
<!-- Shade of the secondary accent system color at 90% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_100">#83f6e5</color>
|
||||
<!-- Shade of the secondary system color at 80% lightness.
|
||||
<color name="system_accent2_100">#83f6e5</color>
|
||||
<!-- Shade of the secondary accent system color at 80% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_200">#65d9c9</color>
|
||||
<!-- Shade of the secondary system color at 70% lightness.
|
||||
<color name="system_accent2_200">#65d9c9</color>
|
||||
<!-- Shade of the secondary accent system color at 70% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_300">#45bdae</color>
|
||||
<!-- Shade of the secondary system color at 60% lightness.
|
||||
<color name="system_accent2_300">#45bdae</color>
|
||||
<!-- Shade of the secondary accent system color at 60% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_400">#1fa293</color>
|
||||
<!-- Shade of the secondary system color at 50% lightness.
|
||||
<color name="system_accent2_400">#1fa293</color>
|
||||
<!-- Shade of the secondary accent system color at 49% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_500">#008377</color>
|
||||
<!-- Shade of the secondary system color at 40% lightness.
|
||||
<color name="system_accent2_500">#008377</color>
|
||||
<!-- Shade of the secondary accent system color at 40% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_600">#006d61</color>
|
||||
<!-- Shade of the secondary system color at 30% lightness.
|
||||
<color name="system_accent2_600">#006d61</color>
|
||||
<!-- Shade of the secondary accent system color at 30% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_700">#005449</color>
|
||||
<!-- Shade of the secondary system color at 20% lightness.
|
||||
<color name="system_accent2_700">#005449</color>
|
||||
<!-- Shade of the secondary accent system color at 20% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_800">#003c33</color>
|
||||
<!-- Shade of the secondary system color at 10% lightness.
|
||||
<color name="system_accent2_800">#003c33</color>
|
||||
<!-- Shade of the secondary accent system color at 10% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_900">#00271e</color>
|
||||
<!-- Darkest shade of the secondary color used by the system. Black.
|
||||
<color name="system_accent2_900">#00271e</color>
|
||||
<!-- Darkest shade of the secondary accent color used by the system. Black.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_secondary_1000">#000000</color>
|
||||
<color name="system_accent2_1000">#000000</color>
|
||||
|
||||
<!-- Lightest shade of the tertiary accent color used by the system. White.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_0">#ffffff</color>
|
||||
<!-- Shade of the tertiary accent system color at 95% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_50">#91fff4</color>
|
||||
<!-- Shade of the tertiary accent system color at 90% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_100">#83f6e5</color>
|
||||
<!-- Shade of the tertiary accent system color at 80% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_200">#65d9c9</color>
|
||||
<!-- Shade of the tertiary accent system color at 70% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_300">#45bdae</color>
|
||||
<!-- Shade of the tertiary accent system color at 60% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_400">#1fa293</color>
|
||||
<!-- Shade of the tertiary accent system color at 49% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_500">#008377</color>
|
||||
<!-- Shade of the tertiary accent system color at 40% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_600">#006d61</color>
|
||||
<!-- Shade of the tertiary accent system color at 30% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_700">#005449</color>
|
||||
<!-- Shade of the tertiary accent system color at 20% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_800">#003c33</color>
|
||||
<!-- Shade of the tertiary accent system color at 10% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_900">#00271e</color>
|
||||
<!-- Darkest shade of the tertiary accent color used by the system. Black.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_accent3_1000">#000000</color>
|
||||
|
||||
<!-- Lightest shade of the neutral color used by the system. White.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_0">#ffffff</color>
|
||||
<color name="system_neutral1_0">#ffffff</color>
|
||||
<!-- Shade of the neutral system color at 95% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_50">#f0f0f0</color>
|
||||
<color name="system_neutral1_50">#f0f0f0</color>
|
||||
<!-- Shade of the neutral system color at 90% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_100">#e2e2e2</color>
|
||||
<color name="system_neutral1_100">#e2e2e2</color>
|
||||
<!-- Shade of the neutral system color at 80% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_200">#c6c6c6</color>
|
||||
<color name="system_neutral1_200">#c6c6c6</color>
|
||||
<!-- Shade of the neutral system color at 70% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_300">#ababab</color>
|
||||
<color name="system_neutral1_300">#ababab</color>
|
||||
<!-- Shade of the neutral system color at 60% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_400">#909090</color>
|
||||
<!-- Shade of the neutral system color at 50% lightness.
|
||||
<color name="system_neutral1_400">#909090</color>
|
||||
<!-- Shade of the neutral system color at 49% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_500">#757575</color>
|
||||
<color name="system_neutral1_500">#757575</color>
|
||||
<!-- Shade of the neutral system color at 40% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_600">#5e5e5e</color>
|
||||
<color name="system_neutral1_600">#5e5e5e</color>
|
||||
<!-- Shade of the neutral system color at 30% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_700">#464646</color>
|
||||
<color name="system_neutral1_700">#464646</color>
|
||||
<!-- Shade of the neutral system color at 20% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_800">#303030</color>
|
||||
<color name="system_neutral1_800">#303030</color>
|
||||
<!-- Shade of the neutral system color at 10% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_900">#1b1b1b</color>
|
||||
<color name="system_neutral1_900">#1b1b1b</color>
|
||||
<!-- Darkest shade of the neutral color used by the system. Black.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral_1000">#000000</color>
|
||||
<color name="system_neutral1_1000">#000000</color>
|
||||
|
||||
<!-- Lightest shade of the secondary neutral color used by the system. White.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_0">#ffffff</color>
|
||||
<!-- Shade of the secondary neutral system color at 95% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_50">#f0f0f0</color>
|
||||
<!-- Shade of the secondary neutral system color at 90% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_100">#e2e2e2</color>
|
||||
<!-- Shade of the secondary neutral system color at 80% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_200">#c6c6c6</color>
|
||||
<!-- Shade of the secondary neutral system color at 70% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_300">#ababab</color>
|
||||
<!-- Shade of the secondary neutral system color at 60% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_400">#909090</color>
|
||||
<!-- Shade of the secondary neutral system color at 49% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_500">#757575</color>
|
||||
<!-- Shade of the secondary neutral system color at 40% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_600">#5e5e5e</color>
|
||||
<!-- Shade of the secondary neutral system color at 30% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_700">#464646</color>
|
||||
<!-- Shade of the secondary neutral system color at 20% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_800">#303030</color>
|
||||
<!-- Shade of the secondary neutral system color at 10% lightness.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_900">#1b1b1b</color>
|
||||
<!-- Darkest shade of the secondary neutral color used by the system. Black.
|
||||
This value can be overlaid at runtime by OverlayManager RROs. -->
|
||||
<color name="system_neutral2_1000">#000000</color>
|
||||
</resources>
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
<!-- Colors specific to DeviceDefault themes. These are mostly pass-throughs to enable
|
||||
overlaying new theme colors. -->
|
||||
<resources>
|
||||
<color name="primary_device_default_dark">@color/system_primary_800</color>
|
||||
<color name="primary_device_default_light">@color/system_primary_50</color>
|
||||
<color name="primary_device_default_settings">@color/system_primary_800</color>
|
||||
<color name="primary_device_default_dark">@color/system_neutral1_800</color>
|
||||
<color name="primary_device_default_light">@color/system_neutral1_50</color>
|
||||
<color name="primary_device_default_settings">@color/system_neutral1_800</color>
|
||||
<color name="primary_device_default_settings_light">@color/primary_device_default_light</color>
|
||||
<color name="primary_dark_device_default_dark">@color/primary_device_default_dark</color>
|
||||
<color name="primary_dark_device_default_light">@color/primary_device_default_light</color>
|
||||
@@ -33,14 +33,14 @@
|
||||
<color name="tertiary_device_default_settings">@color/tertiary_material_settings</color>
|
||||
<color name="quaternary_device_default_settings">@color/quaternary_material_settings</color>
|
||||
|
||||
<color name="accent_device_default_light">@color/system_secondary_600</color>
|
||||
<color name="accent_device_default_dark">@color/system_secondary_200</color>
|
||||
<color name="accent_device_default_light">@color/system_accent1_600</color>
|
||||
<color name="accent_device_default_dark">@color/system_accent1_200</color>
|
||||
<color name="accent_device_default">@color/accent_device_default_light</color>
|
||||
|
||||
<color name="background_device_default_dark">@color/system_primary_800</color>
|
||||
<color name="background_device_default_light">@color/system_primary_50</color>
|
||||
<color name="background_floating_device_default_dark">@color/system_primary_900</color>
|
||||
<color name="background_floating_device_default_light">@color/system_primary_100</color>
|
||||
<color name="background_device_default_dark">@color/system_neutral1_800</color>
|
||||
<color name="background_device_default_light">@color/system_neutral1_50</color>
|
||||
<color name="background_floating_device_default_dark">@color/system_neutral1_900</color>
|
||||
<color name="background_floating_device_default_light">@color/system_neutral1_100</color>
|
||||
|
||||
<!-- Please refer to text_color_[primary]_device_default_[light].xml for text colors-->
|
||||
<color name="foreground_device_default_light">@color/text_color_primary_device_default_light</color>
|
||||
@@ -50,8 +50,8 @@
|
||||
<color name="error_color_device_default_dark">@color/error_color_material_dark</color>
|
||||
<color name="error_color_device_default_light">@color/error_color_material_light</color>
|
||||
|
||||
<color name="list_divider_color_light">@color/system_primary_500</color>
|
||||
<color name="list_divider_color_dark">@color/system_primary_400</color>
|
||||
<color name="list_divider_color_light">@color/system_neutral1_200</color>
|
||||
<color name="list_divider_color_dark">@color/system_neutral1_700</color>
|
||||
<color name="list_divider_opacity_device_default_light">@android:color/white</color>
|
||||
<color name="list_divider_opacity_device_default_dark">@android:color/white</color>
|
||||
|
||||
|
||||
@@ -3102,45 +3102,68 @@
|
||||
<!-- color definitions go here -->
|
||||
|
||||
<!-- Material design dynamic system palette:-->
|
||||
<!-- Primary color -->
|
||||
<public name="system_primary_0" />
|
||||
<public name="system_primary_50" />
|
||||
<public name="system_primary_100" />
|
||||
<public name="system_primary_200" />
|
||||
<public name="system_primary_300" />
|
||||
<public name="system_primary_400" />
|
||||
<public name="system_primary_500" />
|
||||
<public name="system_primary_600" />
|
||||
<public name="system_primary_700" />
|
||||
<public name="system_primary_800" />
|
||||
<public name="system_primary_900" />
|
||||
<public name="system_primary_1000" />
|
||||
<!-- Secondary color -->
|
||||
<public name="system_secondary_0" />
|
||||
<public name="system_secondary_50" />
|
||||
<public name="system_secondary_100" />
|
||||
<public name="system_secondary_200" />
|
||||
<public name="system_secondary_300" />
|
||||
<public name="system_secondary_400" />
|
||||
<public name="system_secondary_500" />
|
||||
<public name="system_secondary_600" />
|
||||
<public name="system_secondary_700" />
|
||||
<public name="system_secondary_800" />
|
||||
<public name="system_secondary_900" />
|
||||
<public name="system_secondary_1000" />
|
||||
<!-- Neutral color -->
|
||||
<public name="system_neutral_0" />
|
||||
<public name="system_neutral_50" />
|
||||
<public name="system_neutral_100" />
|
||||
<public name="system_neutral_200" />
|
||||
<public name="system_neutral_300" />
|
||||
<public name="system_neutral_400" />
|
||||
<public name="system_neutral_500" />
|
||||
<public name="system_neutral_600" />
|
||||
<public name="system_neutral_700" />
|
||||
<public name="system_neutral_800" />
|
||||
<public name="system_neutral_900" />
|
||||
<public name="system_neutral_1000" />
|
||||
<!-- Neutral colors for background and text -->
|
||||
<public name="system_neutral1_0" />
|
||||
<public name="system_neutral1_50" />
|
||||
<public name="system_neutral1_100" />
|
||||
<public name="system_neutral1_200" />
|
||||
<public name="system_neutral1_300" />
|
||||
<public name="system_neutral1_400" />
|
||||
<public name="system_neutral1_500" />
|
||||
<public name="system_neutral1_600" />
|
||||
<public name="system_neutral1_700" />
|
||||
<public name="system_neutral1_800" />
|
||||
<public name="system_neutral1_900" />
|
||||
<public name="system_neutral1_1000" />
|
||||
<public name="system_neutral2_0" />
|
||||
<public name="system_neutral2_50" />
|
||||
<public name="system_neutral2_100" />
|
||||
<public name="system_neutral2_200" />
|
||||
<public name="system_neutral2_300" />
|
||||
<public name="system_neutral2_400" />
|
||||
<public name="system_neutral2_500" />
|
||||
<public name="system_neutral2_600" />
|
||||
<public name="system_neutral2_700" />
|
||||
<public name="system_neutral2_800" />
|
||||
<public name="system_neutral2_900" />
|
||||
<public name="system_neutral2_1000" />
|
||||
<!-- Accent colors, for buttons and UI decorations -->
|
||||
<public name="system_accent1_0" />
|
||||
<public name="system_accent1_50" />
|
||||
<public name="system_accent1_100" />
|
||||
<public name="system_accent1_200" />
|
||||
<public name="system_accent1_300" />
|
||||
<public name="system_accent1_400" />
|
||||
<public name="system_accent1_500" />
|
||||
<public name="system_accent1_600" />
|
||||
<public name="system_accent1_700" />
|
||||
<public name="system_accent1_800" />
|
||||
<public name="system_accent1_900" />
|
||||
<public name="system_accent1_1000" />
|
||||
<public name="system_accent2_0" />
|
||||
<public name="system_accent2_50" />
|
||||
<public name="system_accent2_100" />
|
||||
<public name="system_accent2_200" />
|
||||
<public name="system_accent2_300" />
|
||||
<public name="system_accent2_400" />
|
||||
<public name="system_accent2_500" />
|
||||
<public name="system_accent2_600" />
|
||||
<public name="system_accent2_700" />
|
||||
<public name="system_accent2_800" />
|
||||
<public name="system_accent2_900" />
|
||||
<public name="system_accent2_1000" />
|
||||
<public name="system_accent3_0" />
|
||||
<public name="system_accent3_50" />
|
||||
<public name="system_accent3_100" />
|
||||
<public name="system_accent3_200" />
|
||||
<public name="system_accent3_300" />
|
||||
<public name="system_accent3_400" />
|
||||
<public name="system_accent3_500" />
|
||||
<public name="system_accent3_600" />
|
||||
<public name="system_accent3_700" />
|
||||
<public name="system_accent3_800" />
|
||||
<public name="system_accent3_900" />
|
||||
<public name="system_accent3_1000" />
|
||||
</public-group>
|
||||
|
||||
<public-group type="dimen" first-id="0x01050008">
|
||||
|
||||
@@ -65,8 +65,6 @@ public class ThemeOverlayApplier implements Dumpable {
|
||||
"android.theme.customization.accent_color";
|
||||
static final String OVERLAY_CATEGORY_SYSTEM_PALETTE =
|
||||
"android.theme.customization.system_palette";
|
||||
static final String OVERLAY_CATEGORY_NEUTRAL_PALETTE =
|
||||
"android.theme.customization.neutral_palette";
|
||||
@VisibleForTesting
|
||||
static final String OVERLAY_CATEGORY_FONT = "android.theme.customization.font";
|
||||
@VisibleForTesting
|
||||
@@ -94,7 +92,6 @@ public class ThemeOverlayApplier implements Dumpable {
|
||||
*/
|
||||
static final List<String> THEME_CATEGORIES = Lists.newArrayList(
|
||||
OVERLAY_CATEGORY_SYSTEM_PALETTE,
|
||||
OVERLAY_CATEGORY_NEUTRAL_PALETTE,
|
||||
OVERLAY_CATEGORY_ICON_LAUNCHER,
|
||||
OVERLAY_CATEGORY_SHAPE,
|
||||
OVERLAY_CATEGORY_FONT,
|
||||
@@ -108,7 +105,6 @@ public class ThemeOverlayApplier implements Dumpable {
|
||||
@VisibleForTesting
|
||||
static final Set<String> SYSTEM_USER_CATEGORIES = Sets.newHashSet(
|
||||
OVERLAY_CATEGORY_SYSTEM_PALETTE,
|
||||
OVERLAY_CATEGORY_NEUTRAL_PALETTE,
|
||||
OVERLAY_CATEGORY_ACCENT_COLOR,
|
||||
OVERLAY_CATEGORY_FONT,
|
||||
OVERLAY_CATEGORY_SHAPE,
|
||||
@@ -131,8 +127,8 @@ public class ThemeOverlayApplier implements Dumpable {
|
||||
mLauncherPackage = launcherPackage;
|
||||
mThemePickerPackage = themePickerPackage;
|
||||
mTargetPackageToCategories.put(ANDROID_PACKAGE, Sets.newHashSet(
|
||||
OVERLAY_CATEGORY_SYSTEM_PALETTE, OVERLAY_CATEGORY_NEUTRAL_PALETTE,
|
||||
OVERLAY_CATEGORY_ACCENT_COLOR, OVERLAY_CATEGORY_FONT, OVERLAY_CATEGORY_SHAPE,
|
||||
OVERLAY_CATEGORY_SYSTEM_PALETTE, OVERLAY_CATEGORY_ACCENT_COLOR,
|
||||
OVERLAY_CATEGORY_FONT, OVERLAY_CATEGORY_SHAPE,
|
||||
OVERLAY_CATEGORY_ICON_ANDROID));
|
||||
mTargetPackageToCategories.put(SYSUI_PACKAGE,
|
||||
Sets.newHashSet(OVERLAY_CATEGORY_ICON_SYSUI));
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
package com.android.systemui.theme;
|
||||
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ACCENT_COLOR;
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_NEUTRAL_PALETTE;
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_SYSTEM_PALETTE;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
@@ -82,9 +81,8 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
||||
protected static final String TAG = "ThemeOverlayController";
|
||||
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
|
||||
|
||||
protected static final int PRIMARY = 0;
|
||||
protected static final int SECONDARY = 1;
|
||||
protected static final int NEUTRAL = 2;
|
||||
protected static final int NEUTRAL = 0;
|
||||
protected static final int ACCENT = 1;
|
||||
|
||||
private final ThemeOverlayApplier mThemeManager;
|
||||
private final UserManager mUserManager;
|
||||
@@ -103,8 +101,6 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
||||
protected int mMainWallpaperColor = Color.TRANSPARENT;
|
||||
// Accent color extracted from wallpaper, NOT the color used on the overlay
|
||||
protected int mWallpaperAccentColor = Color.TRANSPARENT;
|
||||
// System colors overlay
|
||||
private FabricatedOverlay mPrimaryOverlay;
|
||||
// Accent colors overlay
|
||||
private FabricatedOverlay mSecondaryOverlay;
|
||||
// Neutral system colors overlay
|
||||
@@ -205,7 +201,7 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
||||
mainColor = Color.TRANSPARENT;
|
||||
accentCandidate = Color.TRANSPARENT;
|
||||
} else {
|
||||
mainColor = getDominantColor(currentColors);
|
||||
mainColor = getNeutralColor(currentColors);
|
||||
accentCandidate = getAccentColor(currentColors);
|
||||
}
|
||||
|
||||
@@ -218,13 +214,12 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
||||
mWallpaperAccentColor = accentCandidate;
|
||||
|
||||
if (mIsMonetEnabled) {
|
||||
mPrimaryOverlay = getOverlay(mMainWallpaperColor, PRIMARY);
|
||||
mSecondaryOverlay = getOverlay(mWallpaperAccentColor, SECONDARY);
|
||||
mSecondaryOverlay = getOverlay(mWallpaperAccentColor, ACCENT);
|
||||
mNeutralOverlay = getOverlay(mMainWallpaperColor, NEUTRAL);
|
||||
mNeedsOverlayCreation = true;
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "fetched overlays. primary: " + mPrimaryOverlay + " secondary: "
|
||||
+ mSecondaryOverlay + " neutral: " + mNeutralOverlay);
|
||||
Log.d(TAG, "fetched overlays. accent: " + mSecondaryOverlay
|
||||
+ " neutral: " + mNeutralOverlay);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +229,7 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
||||
/**
|
||||
* Return the main theme color from a given {@link WallpaperColors} instance.
|
||||
*/
|
||||
protected int getDominantColor(@NonNull WallpaperColors wallpaperColors) {
|
||||
protected int getNeutralColor(@NonNull WallpaperColors wallpaperColors) {
|
||||
return wallpaperColors.getPrimaryColor().toArgb();
|
||||
}
|
||||
|
||||
@@ -283,8 +278,6 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
||||
if (mIsMonetEnabled && systemPalette != null && systemPalette.getPackageName() != null) {
|
||||
try {
|
||||
int color = Integer.parseInt(systemPalette.getPackageName().toLowerCase(), 16);
|
||||
mPrimaryOverlay = getOverlay(color, PRIMARY);
|
||||
// Neutral palette is always derived from primary color.
|
||||
mNeutralOverlay = getOverlay(color, NEUTRAL);
|
||||
mNeedsOverlayCreation = true;
|
||||
categoryToPackage.remove(OVERLAY_CATEGORY_SYSTEM_PALETTE);
|
||||
@@ -308,7 +301,7 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
||||
if (mIsMonetEnabled && accentPalette != null && accentPalette.getPackageName() != null) {
|
||||
try {
|
||||
int color = Integer.parseInt(accentPalette.getPackageName().toLowerCase(), 16);
|
||||
mSecondaryOverlay = getOverlay(color, SECONDARY);
|
||||
mSecondaryOverlay = getOverlay(color, ACCENT);
|
||||
mNeedsOverlayCreation = true;
|
||||
categoryToPackage.remove(OVERLAY_CATEGORY_ACCENT_COLOR);
|
||||
} catch (NumberFormatException e) {
|
||||
@@ -326,9 +319,8 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
||||
// Compatibility with legacy themes, where full packages were defined, instead of just
|
||||
// colors.
|
||||
if (!categoryToPackage.containsKey(OVERLAY_CATEGORY_SYSTEM_PALETTE)
|
||||
&& mPrimaryOverlay != null) {
|
||||
categoryToPackage.put(OVERLAY_CATEGORY_SYSTEM_PALETTE, mPrimaryOverlay.getIdentifier());
|
||||
categoryToPackage.put(OVERLAY_CATEGORY_NEUTRAL_PALETTE,
|
||||
&& mNeutralOverlay != null) {
|
||||
categoryToPackage.put(OVERLAY_CATEGORY_SYSTEM_PALETTE,
|
||||
mNeutralOverlay.getIdentifier());
|
||||
}
|
||||
if (!categoryToPackage.containsKey(OVERLAY_CATEGORY_ACCENT_COLOR)
|
||||
@@ -350,7 +342,7 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
||||
if (mNeedsOverlayCreation) {
|
||||
mNeedsOverlayCreation = false;
|
||||
mThemeManager.applyCurrentUserOverlays(categoryToPackage, new FabricatedOverlay[] {
|
||||
mPrimaryOverlay, mSecondaryOverlay, mNeutralOverlay
|
||||
mSecondaryOverlay, mNeutralOverlay
|
||||
}, currentUser, managedProfiles);
|
||||
} else {
|
||||
mThemeManager.applyCurrentUserOverlays(categoryToPackage, null, currentUser,
|
||||
@@ -363,7 +355,6 @@ public class ThemeOverlayController extends SystemUI implements Dumpable {
|
||||
pw.println("mSystemColors=" + mSystemColors);
|
||||
pw.println("mMainWallpaperColor=" + Integer.toHexString(mMainWallpaperColor));
|
||||
pw.println("mWallpaperAccentColor=" + Integer.toHexString(mWallpaperAccentColor));
|
||||
pw.println("mPrimaryOverlay=" + mPrimaryOverlay);
|
||||
pw.println("mSecondaryOverlay=" + mSecondaryOverlay);
|
||||
pw.println("mNeutralOverlay=" + mNeutralOverlay);
|
||||
pw.println("mIsMonetEnabled=" + mIsMonetEnabled);
|
||||
|
||||
@@ -23,7 +23,6 @@ import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_IC
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ICON_SETTINGS;
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ICON_SYSUI;
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ICON_THEME_PICKER;
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_NEUTRAL_PALETTE;
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_SHAPE;
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_SYSTEM_PALETTE;
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.SETTINGS_PACKAGE;
|
||||
@@ -116,8 +115,6 @@ public class ThemeOverlayApplierTest extends SysuiTestCase {
|
||||
ANDROID_PACKAGE, OVERLAY_CATEGORY_ACCENT_COLOR, false),
|
||||
createOverlayInfo(TEST_DISABLED_PREFIX + OVERLAY_CATEGORY_SYSTEM_PALETTE,
|
||||
ANDROID_PACKAGE, OVERLAY_CATEGORY_SYSTEM_PALETTE, false),
|
||||
createOverlayInfo(TEST_DISABLED_PREFIX + OVERLAY_CATEGORY_NEUTRAL_PALETTE,
|
||||
ANDROID_PACKAGE, OVERLAY_CATEGORY_NEUTRAL_PALETTE, false),
|
||||
createOverlayInfo(TEST_DISABLED_PREFIX + OVERLAY_CATEGORY_FONT,
|
||||
ANDROID_PACKAGE, OVERLAY_CATEGORY_FONT, false),
|
||||
createOverlayInfo(TEST_DISABLED_PREFIX + OVERLAY_CATEGORY_SHAPE,
|
||||
@@ -128,8 +125,6 @@ public class ThemeOverlayApplierTest extends SysuiTestCase {
|
||||
ANDROID_PACKAGE, OVERLAY_CATEGORY_ACCENT_COLOR, true),
|
||||
createOverlayInfo(TEST_ENABLED_PREFIX + OVERLAY_CATEGORY_SYSTEM_PALETTE,
|
||||
ANDROID_PACKAGE, OVERLAY_CATEGORY_SYSTEM_PALETTE, true),
|
||||
createOverlayInfo(TEST_ENABLED_PREFIX + OVERLAY_CATEGORY_NEUTRAL_PALETTE,
|
||||
ANDROID_PACKAGE, OVERLAY_CATEGORY_NEUTRAL_PALETTE, true),
|
||||
createOverlayInfo(TEST_ENABLED_PREFIX + OVERLAY_CATEGORY_FONT,
|
||||
ANDROID_PACKAGE, OVERLAY_CATEGORY_FONT, true),
|
||||
createOverlayInfo(TEST_ENABLED_PREFIX + OVERLAY_CATEGORY_SHAPE,
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.android.systemui.theme;
|
||||
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ACCENT_COLOR;
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_NEUTRAL_PALETTE;
|
||||
import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_SYSTEM_PALETTE;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
@@ -147,8 +146,6 @@ public class ThemeOverlayControllerTest extends SysuiTestCase {
|
||||
// Assert that we received the colors that we were expecting
|
||||
assertThat(themeOverlays.getValue().get(OVERLAY_CATEGORY_SYSTEM_PALETTE))
|
||||
.isEqualTo(new OverlayIdentifier("ffff0000"));
|
||||
assertThat(themeOverlays.getValue().get(OVERLAY_CATEGORY_NEUTRAL_PALETTE))
|
||||
.isEqualTo(new OverlayIdentifier("ffff0000"));
|
||||
assertThat(themeOverlays.getValue().get(OVERLAY_CATEGORY_ACCENT_COLOR))
|
||||
.isEqualTo(new OverlayIdentifier("ff0000ff"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user