summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorwangqi <wangqi@google.com>2018-05-29 18:08:16 -0700
committerCopybara-Service <copybara-piper@google.com>2018-06-01 18:10:26 -0700
commit70189d8b844927d7f223170235550d0f0fce5264 (patch)
tree183e9033f8538360d02d51174ce35d75c748d0e1 /java
parentd1a123acf2b123671e745bf4419e3a826b2ea58d (diff)
Fix dialpad theme on incall screen.
Test: manual PiperOrigin-RevId: 198488607 Change-Id: I54e2d7ac4320fd67e1670bb2e888cfe833dfb243
Diffstat (limited to 'java')
-rw-r--r--java/com/android/dialer/dialpadview/theme/res/values/styles.xml2
-rw-r--r--java/com/android/dialer/main/impl/res/values/styles.xml4
-rw-r--r--java/com/android/incallui/DialpadFragment.java5
-rw-r--r--java/com/android/incallui/theme/res/values/styles.xml4
4 files changed, 8 insertions, 7 deletions
diff --git a/java/com/android/dialer/dialpadview/theme/res/values/styles.xml b/java/com/android/dialer/dialpadview/theme/res/values/styles.xml
index 04ebb1b13..8705a17a4 100644
--- a/java/com/android/dialer/dialpadview/theme/res/values/styles.xml
+++ b/java/com/android/dialer/dialpadview/theme/res/values/styles.xml
@@ -32,7 +32,7 @@
<item name="dialpad_elevation">0dp</item>
</style>
- <style name="Dialpad.Light">
+ <style name="Dialpad.Themed">
<item name="dialpad_text_color">?android:attr/textColorSecondary</item>
<item name="dialpad_text_color_primary">?android:attr/colorPrimary</item>
<item name="dialpad_text_color_secondary">?android:attr/textColorSecondary</item>
diff --git a/java/com/android/dialer/main/impl/res/values/styles.xml b/java/com/android/dialer/main/impl/res/values/styles.xml
index 7b36e78ef..dd24179bf 100644
--- a/java/com/android/dialer/main/impl/res/values/styles.xml
+++ b/java/com/android/dialer/main/impl/res/values/styles.xml
@@ -27,7 +27,7 @@
<!-- TODO(a bug): Check to see if we can remove this after NewVoicemailFragment launches -->
<item name="actionModeStyle">@style/MainActionModeStyle</item>
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
- <item name="dialpad_style">@style/Dialpad.Light</item>
+ <item name="dialpad_style">@style/Dialpad.Themed</item>
</style>
<style name="MainActivityThemeBase.Dark" parent="Dialer.Dark.ThemeBase.NoActionBar">
@@ -35,7 +35,7 @@
<!-- TODO(a bug): Check to see if we can remove this after NewVoicemailFragment launches -->
<item name="actionModeStyle">@style/MainActionModeStyle</item>
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
- <item name="dialpad_style">@style/Dialpad.Light</item>
+ <item name="dialpad_style">@style/Dialpad.Themed</item>
</style>
<!-- Colors our actionbar in action mode to dialer theme color. -->
diff --git a/java/com/android/incallui/DialpadFragment.java b/java/com/android/incallui/DialpadFragment.java
index 343cb34fd..2ae2aca94 100644
--- a/java/com/android/incallui/DialpadFragment.java
+++ b/java/com/android/incallui/DialpadFragment.java
@@ -21,6 +21,7 @@ import android.os.Bundle;
import android.telephony.PhoneNumberUtils;
import android.util.ArrayMap;
import android.util.AttributeSet;
+import android.view.ContextThemeWrapper;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
@@ -136,7 +137,9 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadUi>
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
- final View parent = inflater.inflate(R.layout.incall_dialpad_fragment, container, false);
+ Context contextThemeWrapper = new ContextThemeWrapper(getActivity(), R.style.Dialer_ThemeBase);
+ LayoutInflater layoutInflater = inflater.cloneInContext(contextThemeWrapper);
+ 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);
diff --git a/java/com/android/incallui/theme/res/values/styles.xml b/java/com/android/incallui/theme/res/values/styles.xml
index 3475e3548..58608aca3 100644
--- a/java/com/android/incallui/theme/res/values/styles.xml
+++ b/java/com/android/incallui/theme/res/values/styles.xml
@@ -49,7 +49,7 @@
<style name="Theme.InCallScreen.ManageConference" parent="Dialer.ThemeBase.ActionBar">
</style>
- <style name="InCallDialpad" parent="Dialpad.Light">
+ <style name="InCallDialpad" parent="Dialpad.Themed">
<item name="dialpad_key_number_margin_bottom">
@dimen/incall_dialpad_key_number_margin_bottom
</item>
@@ -72,8 +72,6 @@
@dimen/incall_end_call_spacing
</item>
<item name="dialpad_elevation">10dp</item>
- <item name="dialpad_text_color">?android:attr/textColorPrimaryInverse</item>
- <item name="dialpad_text_color_secondary">?android:attr/textColorSecondaryInverse</item>
</style>
<style name="AfterCallNotificationTheme" parent="Dialer.ThemeBase.NoActionBar">