am 8040e47d: am 20ffcaa1: Merge "Add colorEdgeEffect to themes, default it to colorPrimary" into lmp-dev
* commit '8040e47d83e3fe2c1d28c2dcbfbd80fd5cc0b26f':
Add colorEdgeEffect to themes, default it to colorPrimary
diff --git a/api/current.txt b/api/current.txt
index 9aba0f3..90d63b0 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -409,6 +409,7 @@
field public static final int colorControlActivated = 16843818; // 0x101042a
field public static final int colorControlHighlight = 16843820; // 0x101042c
field public static final int colorControlNormal = 16843817; // 0x1010429
+ field public static final int colorEdgeEffect = 16843982; // 0x10104ce
field public static final int colorFocusedHighlight = 16843663; // 0x101038f
field public static final int colorForeground = 16842800; // 0x1010030
field public static final int colorForegroundInverse = 16843270; // 0x1010206
diff --git a/core/java/android/widget/EdgeEffect.java b/core/java/android/widget/EdgeEffect.java
index 033b99a..6925756 100644
--- a/core/java/android/widget/EdgeEffect.java
+++ b/core/java/android/widget/EdgeEffect.java
@@ -120,7 +120,7 @@
final TypedArray a = context.obtainStyledAttributes(
com.android.internal.R.styleable.EdgeEffect);
final int themeColor = a.getColor(
- com.android.internal.R.styleable.EdgeEffect_colorPrimary, 0xff666666);
+ com.android.internal.R.styleable.EdgeEffect_colorEdgeEffect, 0xff666666);
a.recycle();
mPaint.setColor((themeColor & 0xffffff) | 0x33000000);
mPaint.setStyle(Paint.Style.FILL);
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 85c1072..90217e5 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1020,6 +1020,9 @@
<!-- The color applied to framework switch thumbs in their normal state. -->
<attr name="colorSwitchThumbNormal" format="color" />
+ <!-- The color applied to the edge effect on scrolling containers. -->
+ <attr name="colorEdgeEffect" format="color" />
+
<!-- =================== -->
<!-- Lighting properties -->
<!-- =================== -->
@@ -7435,7 +7438,7 @@
<!-- Used as a filter array on the theme to pull out only the EdgeEffect-relevant bits. -->
<declare-styleable name="EdgeEffect">
- <attr name="colorPrimary" />
+ <attr name="colorEdgeEffect" />
</declare-styleable>
<!-- Use <code>tv-input</code> as the root tag of the XML resource that describes a
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index bbd40a1..a794b62 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2291,6 +2291,7 @@
<public type="attr" name="strokeAlpha" id="0x010104cb" />
<public type="attr" name="fillAlpha" id="0x010104cc" />
<public type="attr" name="windowActivityTransitions" id="0x010104cd" />
+ <public type="attr" name="colorEdgeEffect" id="0x010104ce" />
<public type="id" name="mask" id="0x0102002e" />
<public type="id" name="statusBarBackground" id="0x0102002f" />
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 0577659..3a268a3 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -59,6 +59,7 @@
<item name="colorControlNormal">@color/legacy_control_normal</item>
<item name="colorControlHighlight">@color/legacy_button_pressed</item>
<item name="colorButtonNormal">@color/legacy_button_normal</item>
+ <item name="colorEdgeEffect">?attr/colorPrimary</item>
<item name="disabledAlpha">0.5</item>
<item name="backgroundDimAmount">0.6</item>
diff --git a/core/res/res/values/themes_holo.xml b/core/res/res/values/themes_holo.xml
index 14853b8..208db97 100644
--- a/core/res/res/values/themes_holo.xml
+++ b/core/res/res/values/themes_holo.xml
@@ -81,6 +81,7 @@
<item name="colorControlNormal">@color/holo_control_normal</item>
<item name="colorControlHighlight">@color/holo_button_pressed</item>
<item name="colorButtonNormal">@color/holo_button_normal</item>
+ <item name="colorEdgeEffect">?attr/colorPrimary</item>
<!-- Text styles -->
<item name="textAppearance">@style/TextAppearance.Holo</item>
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index 615ef52..ebf0571 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -375,6 +375,7 @@
<item name="colorPrimaryDark">@color/material_blue_grey_900</item>
<item name="colorPrimary">@color/material_blue_grey_800</item>
<item name="colorAccent">@color/material_deep_teal_200</item>
+ <item name="colorEdgeEffect">?attr/colorPrimary</item>
<item name="colorControlNormal">?attr/textColorSecondary</item>
<item name="colorControlActivated">?attr/colorAccent</item>