Add styleable attribute for dialpad ripple touch tints.
- Add an attribute, which can be set in Dialer/InCall.
- Read this attribute in DialpadView, and if defined set this on the
ripple drawable which is applied to the dialpad key button. We aren't
able to instantiate a new instance of RippleDrawable right now, so
this is the slightly roundabout way of accomplishing this. This
drawable is then set as the background of the dialpad key buttons.
Bug: 15168708
Change-Id: I64d6e0957c0167827c6a6124a4855d46feb87452
diff --git a/res-common/drawable/btn_dialpad_key.xml b/res-common/drawable/btn_dialpad_key.xml
index 0a279f0..a04d35a 100644
--- a/res-common/drawable/btn_dialpad_key.xml
+++ b/res-common/drawable/btn_dialpad_key.xml
@@ -15,4 +15,5 @@
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:tint="@color/dialpad_touch_tint" android:pinned="true"/>
\ No newline at end of file
+ android:tint="?android:attr/colorControlHighlight"
+ android:pinned="true"/>
\ No newline at end of file
diff --git a/res-common/values/attrs.xml b/res-common/values/attrs.xml
index dfba0d8..3a143bf 100644
--- a/res-common/values/attrs.xml
+++ b/res-common/values/attrs.xml
@@ -78,4 +78,7 @@
<attr name="favorites_padding_bottom" format="dimension"/>
</declare-styleable>
+ <declare-styleable name="Dialpad">
+ <attr name="dialpad_key_button_touch_tint" format="color"/>
+ </declare-styleable>
</resources>
diff --git a/res-common/values/colors.xml b/res-common/values/colors.xml
index fd0466d..df96b5f 100644
--- a/res-common/values/colors.xml
+++ b/res-common/values/colors.xml
@@ -93,7 +93,4 @@
<color name="dialpad_digits_text_color">#bf000000</color>
<color name="dialpad_separator_line_color">#dadada</color>
<color name="dialpad_icon_tint">#b3b3b3</color>
-
- <!-- 35% opacity, black. -->
- <color name="dialpad_touch_tint">#59000000</color>
</resources>