Dialer: Use Material You theming for incallui dialpad
* Follow main dialpad in most aspects.
Change-Id: I93a5ec9a1e3889ba7f64acb688912ae3a62d9df2
diff --git a/java/com/android/incallui/DialpadFragment.java b/java/com/android/incallui/DialpadFragment.java
index 2ae2aca..0f8e0c7 100644
--- a/java/com/android/incallui/DialpadFragment.java
+++ b/java/com/android/incallui/DialpadFragment.java
@@ -84,7 +84,6 @@
// KeyListener used with the "dialpad digits" EditText widget.
private DtmfKeyListener dtmfKeyListener;
private DialpadView dialpadView;
- private int currentTextColor;
private View endCallSpace;
private boolean shouldShowEndCallSpace = true;
@@ -142,7 +141,6 @@
final View parent = layoutInflater.inflate(R.layout.incall_dialpad_fragment, container, false);
dialpadView = (DialpadView) parent.findViewById(R.id.dialpad_view);
dialpadView.setCanDigitsBeEdited(false);
- dialpadView.setBackgroundResource(R.color.incall_dialpad_background);
dtmfDialerField = (EditText) parent.findViewById(R.id.digits);
if (dtmfDialerField != null) {
LogUtil.i("DialpadFragment.onCreateView", "creating dtmfKeyListener");
@@ -165,26 +163,9 @@
@Override
public void onResume() {
super.onResume();
- updateColors();
endCallSpace.setVisibility(shouldShowEndCallSpace ? View.VISIBLE : View.GONE);
}
- public void updateColors() {
- int textColor = InCallPresenter.getInstance().getThemeColorManager().getPrimaryColor();
-
- if (currentTextColor == textColor) {
- return;
- }
-
- DialpadKeyButton dialpadKey;
- for (int i = 0; i < buttonIds.length; i++) {
- dialpadKey = (DialpadKeyButton) dialpadView.findViewById(buttonIds[i]);
- ((TextView) dialpadKey.findViewById(R.id.dialpad_key_number)).setTextColor(textColor);
- }
-
- currentTextColor = textColor;
- }
-
@Override
public void onDestroyView() {
dtmfKeyListener = null;
diff --git a/java/com/android/incallui/theme/res/values/colors.xml b/java/com/android/incallui/theme/res/values/colors.xml
index d05df68..0ed34ff 100644
--- a/java/com/android/incallui/theme/res/values/colors.xml
+++ b/java/com/android/incallui/theme/res/values/colors.xml
@@ -20,8 +20,6 @@
<!-- Used with some smaller texts in manage conference screen. -->
<color name="conference_call_manager_secondary_text_color">#999999</color>
- <color name="incall_dialpad_background">#ffffff</color>
-
<!-- Background color for status bar. For portrait this will be ignored. -->
<color name="statusbar_background_color">?android:attr/colorPrimary</color>
diff --git a/java/com/android/incallui/theme/res/values/styles.xml b/java/com/android/incallui/theme/res/values/styles.xml
index 5b65cc3..1489ae8 100644
--- a/java/com/android/incallui/theme/res/values/styles.xml
+++ b/java/com/android/incallui/theme/res/values/styles.xml
@@ -24,11 +24,8 @@
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
-
- <item name="dialpad_key_button_touch_tint">?attr/colorPrimary20pct</item>
<item name="dialpad_style">@style/InCallDialpad</item>
<item name="android:windowAnimationStyle">@null</item>
-
<item name="android:windowBackground">@drawable/incall_background_gradient</item>
<item name="android:windowShowWallpaper">true</item>
</style>
@@ -41,11 +38,8 @@
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
<item name="colorPrimaryDark">@color/dialer_theme_color_dark</item>
-
- <item name="dialpad_key_button_touch_tint">?attr/colorPrimary20pct</item>
<item name="dialpad_style">@style/InCallDialpad</item>
<item name="android:windowAnimationStyle">@null</item>
-
<item name="android:windowBackground">@drawable/incall_background_gradient</item>
<item name="android:windowShowWallpaper">true</item>
</style>