From 70189d8b844927d7f223170235550d0f0fce5264 Mon Sep 17 00:00:00 2001 From: wangqi Date: Tue, 29 May 2018 18:08:16 -0700 Subject: Fix dialpad theme on incall screen. Test: manual PiperOrigin-RevId: 198488607 Change-Id: I54e2d7ac4320fd67e1670bb2e888cfe833dfb243 --- java/com/android/incallui/DialpadFragment.java | 5 ++++- java/com/android/incallui/theme/res/values/styles.xml | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'java/com/android/incallui') 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 @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 @@ -