From e7097d78980eccdc2425266db92a3e88f4f5c1a5 Mon Sep 17 00:00:00 2001 From: Christine Chen Date: Fri, 2 Aug 2013 20:31:31 -0700 Subject: Dialpad Ui elements for InCallUi Change-Id: I7b230cc46993493459923c436a643910026cf6a6 --- .../src/com/android/incallui/CallButtonFragment.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'InCallUI/src/com/android/incallui/CallButtonFragment.java') diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java index 3ccc1d1d1..772251dfa 100644 --- a/InCallUI/src/com/android/incallui/CallButtonFragment.java +++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java @@ -34,6 +34,8 @@ public class CallButtonFragment extends BaseFragment private ToggleButton mMuteButton; private ToggleButton mAudioButton; private ToggleButton mHoldButton; + private ToggleButton mShowDialpadButton; + private View mEndCallButton; @Override @@ -87,6 +89,14 @@ public class CallButtonFragment extends BaseFragment } }); + mShowDialpadButton = (ToggleButton) parent.findViewById(R.id.dialpadButton); + mShowDialpadButton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + getPresenter().showDialpadClicked(isChecked); + } + }); + return parent; } @@ -121,4 +131,12 @@ public class CallButtonFragment extends BaseFragment public void setHold(boolean value) { mHoldButton.setChecked(value); } + + @Override + public void displayDialpad(boolean value) { + mShowDialpadButton.setChecked(value); + if (getActivity() != null && getActivity() instanceof InCallActivity) { + ((InCallActivity) getActivity()).displayDialpad(value); + } + } } -- cgit v1.2.3