From b16aafab5bed220e9e27f9d14e66ab6de75c27cd Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 1 May 2014 12:31:20 -0700 Subject: Consolidate buttons to use more common drawables. - Work is to facilitate styling selected button states to QP spec. - Change buttons to use btn_compound_background instead of the _fake_ version. - Deleted now-unused assets. - Changed btn_compound_background to use common action tab drawables. - Switched the dialpad button from a ToggleButton into an ImageButton, so that all the call buttons can use the same background. Technically, ToggleButton is more precise, but ImageButton is sufficient for behavior, and allows me to switch the state casing in the drawable to use state_selected instead of state_checked. Bug: 14108639 Change-Id: If6ebf05e51648a09307bf37926efb3670f55ba55 --- .../ic_active_state_dialer_holo_dark.png | Bin 450 -> 0 bytes InCallUI/res/drawable-hdpi/list_focused_holo.9.png | Bin 159 -> 0 bytes .../list_selector_disabled_holo_dark.9.png | Bin 185 -> 0 bytes .../ic_active_state_dialer_holo_dark.png | Bin 409 -> 0 bytes InCallUI/res/drawable-mdpi/list_focused_holo.9.png | Bin 158 -> 0 bytes .../list_selector_disabled_holo_dark.9.png | Bin 171 -> 0 bytes .../ic_active_state_dialer_holo_dark.png | Bin 499 -> 0 bytes .../res/drawable-xhdpi/list_focused_holo.9.png | Bin 163 -> 0 bytes .../list_selector_disabled_holo_dark.9.png | Bin 190 -> 0 bytes .../ic_active_state_dialer_holo_dark.png | Bin 1460 -> 0 bytes .../res/drawable-xxhdpi/list_focused_holo.9.png | Bin 1147 -> 0 bytes .../list_selector_disabled_holo_dark.9.png | Bin 1137 -> 0 bytes InCallUI/res/drawable/btn_compound_audio.xml | 2 +- InCallUI/res/drawable/btn_compound_background.xml | 15 ++++----- InCallUI/res/drawable/btn_compound_hold.xml | 30 +++++++++++++++++ InCallUI/res/drawable/btn_compound_mute.xml | 30 +++++++++++++++++ .../res/drawable/btn_fake_compound_background.xml | 36 --------------------- InCallUI/res/drawable/btn_fake_compound_hold.xml | 30 ----------------- InCallUI/res/drawable/btn_fake_compound_mute.xml | 30 ----------------- .../drawable/list_selector_focused_and_checked.xml | 20 ------------ .../list_selector_selected_and_pressed.xml | 20 ------------ InCallUI/res/layout/call_button_fragment.xml | 6 ++-- .../com/android/incallui/CallButtonFragment.java | 8 ++--- 23 files changed, 75 insertions(+), 152 deletions(-) delete mode 100644 InCallUI/res/drawable-hdpi/ic_active_state_dialer_holo_dark.png delete mode 100644 InCallUI/res/drawable-hdpi/list_focused_holo.9.png delete mode 100644 InCallUI/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png delete mode 100644 InCallUI/res/drawable-mdpi/ic_active_state_dialer_holo_dark.png delete mode 100644 InCallUI/res/drawable-mdpi/list_focused_holo.9.png delete mode 100644 InCallUI/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png delete mode 100644 InCallUI/res/drawable-xhdpi/ic_active_state_dialer_holo_dark.png delete mode 100644 InCallUI/res/drawable-xhdpi/list_focused_holo.9.png delete mode 100644 InCallUI/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png delete mode 100644 InCallUI/res/drawable-xxhdpi/ic_active_state_dialer_holo_dark.png delete mode 100644 InCallUI/res/drawable-xxhdpi/list_focused_holo.9.png delete mode 100644 InCallUI/res/drawable-xxhdpi/list_selector_disabled_holo_dark.9.png create mode 100644 InCallUI/res/drawable/btn_compound_hold.xml create mode 100644 InCallUI/res/drawable/btn_compound_mute.xml delete mode 100644 InCallUI/res/drawable/btn_fake_compound_background.xml delete mode 100644 InCallUI/res/drawable/btn_fake_compound_hold.xml delete mode 100644 InCallUI/res/drawable/btn_fake_compound_mute.xml delete mode 100644 InCallUI/res/drawable/list_selector_focused_and_checked.xml delete mode 100644 InCallUI/res/drawable/list_selector_selected_and_pressed.xml diff --git a/InCallUI/res/drawable-hdpi/ic_active_state_dialer_holo_dark.png b/InCallUI/res/drawable-hdpi/ic_active_state_dialer_holo_dark.png deleted file mode 100644 index f4a08bea0..000000000 Binary files a/InCallUI/res/drawable-hdpi/ic_active_state_dialer_holo_dark.png and /dev/null differ diff --git a/InCallUI/res/drawable-hdpi/list_focused_holo.9.png b/InCallUI/res/drawable-hdpi/list_focused_holo.9.png deleted file mode 100644 index 516f5c739..000000000 Binary files a/InCallUI/res/drawable-hdpi/list_focused_holo.9.png and /dev/null differ diff --git a/InCallUI/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png b/InCallUI/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png deleted file mode 100644 index c8afb46f8..000000000 Binary files a/InCallUI/res/drawable-hdpi/list_selector_disabled_holo_dark.9.png and /dev/null differ diff --git a/InCallUI/res/drawable-mdpi/ic_active_state_dialer_holo_dark.png b/InCallUI/res/drawable-mdpi/ic_active_state_dialer_holo_dark.png deleted file mode 100644 index 6ff8e4844..000000000 Binary files a/InCallUI/res/drawable-mdpi/ic_active_state_dialer_holo_dark.png and /dev/null differ diff --git a/InCallUI/res/drawable-mdpi/list_focused_holo.9.png b/InCallUI/res/drawable-mdpi/list_focused_holo.9.png deleted file mode 100644 index 7c0599e3a..000000000 Binary files a/InCallUI/res/drawable-mdpi/list_focused_holo.9.png and /dev/null differ diff --git a/InCallUI/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png b/InCallUI/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png deleted file mode 100644 index c9002b7a3..000000000 Binary files a/InCallUI/res/drawable-mdpi/list_selector_disabled_holo_dark.9.png and /dev/null differ diff --git a/InCallUI/res/drawable-xhdpi/ic_active_state_dialer_holo_dark.png b/InCallUI/res/drawable-xhdpi/ic_active_state_dialer_holo_dark.png deleted file mode 100644 index 0211d69b9..000000000 Binary files a/InCallUI/res/drawable-xhdpi/ic_active_state_dialer_holo_dark.png and /dev/null differ diff --git a/InCallUI/res/drawable-xhdpi/list_focused_holo.9.png b/InCallUI/res/drawable-xhdpi/list_focused_holo.9.png deleted file mode 100644 index 690cb1eb6..000000000 Binary files a/InCallUI/res/drawable-xhdpi/list_focused_holo.9.png and /dev/null differ diff --git a/InCallUI/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png b/InCallUI/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png deleted file mode 100644 index 88726b691..000000000 Binary files a/InCallUI/res/drawable-xhdpi/list_selector_disabled_holo_dark.9.png and /dev/null differ diff --git a/InCallUI/res/drawable-xxhdpi/ic_active_state_dialer_holo_dark.png b/InCallUI/res/drawable-xxhdpi/ic_active_state_dialer_holo_dark.png deleted file mode 100644 index 26a22baaf..000000000 Binary files a/InCallUI/res/drawable-xxhdpi/ic_active_state_dialer_holo_dark.png and /dev/null differ diff --git a/InCallUI/res/drawable-xxhdpi/list_focused_holo.9.png b/InCallUI/res/drawable-xxhdpi/list_focused_holo.9.png deleted file mode 100644 index 3e4ca684e..000000000 Binary files a/InCallUI/res/drawable-xxhdpi/list_focused_holo.9.png and /dev/null differ diff --git a/InCallUI/res/drawable-xxhdpi/list_selector_disabled_holo_dark.9.png b/InCallUI/res/drawable-xxhdpi/list_selector_disabled_holo_dark.9.png deleted file mode 100644 index 26234b1e3..000000000 Binary files a/InCallUI/res/drawable-xxhdpi/list_selector_disabled_holo_dark.9.png and /dev/null differ diff --git a/InCallUI/res/drawable/btn_compound_audio.xml b/InCallUI/res/drawable/btn_compound_audio.xml index 5d364942d..c348c98c1 100644 --- a/InCallUI/res/drawable/btn_compound_audio.xml +++ b/InCallUI/res/drawable/btn_compound_audio.xml @@ -37,7 +37,7 @@ (In states where the audio button *not* a toggle, we explicitly hide this layer.) --> + android:drawable="@drawable/btn_compound_background" /> + + + + + + + + + + + + + diff --git a/InCallUI/res/drawable/btn_compound_mute.xml b/InCallUI/res/drawable/btn_compound_mute.xml new file mode 100644 index 000000000..4e09bd9c3 --- /dev/null +++ b/InCallUI/res/drawable/btn_compound_mute.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + diff --git a/InCallUI/res/drawable/btn_fake_compound_background.xml b/InCallUI/res/drawable/btn_fake_compound_background.xml deleted file mode 100644 index 197f589d1..000000000 --- a/InCallUI/res/drawable/btn_fake_compound_background.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/InCallUI/res/drawable/btn_fake_compound_hold.xml b/InCallUI/res/drawable/btn_fake_compound_hold.xml deleted file mode 100644 index 04bdd9441..000000000 --- a/InCallUI/res/drawable/btn_fake_compound_hold.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/InCallUI/res/drawable/btn_fake_compound_mute.xml b/InCallUI/res/drawable/btn_fake_compound_mute.xml deleted file mode 100644 index 69048a27f..000000000 --- a/InCallUI/res/drawable/btn_fake_compound_mute.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/InCallUI/res/drawable/list_selector_focused_and_checked.xml b/InCallUI/res/drawable/list_selector_focused_and_checked.xml deleted file mode 100644 index 113dae821..000000000 --- a/InCallUI/res/drawable/list_selector_focused_and_checked.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - diff --git a/InCallUI/res/drawable/list_selector_selected_and_pressed.xml b/InCallUI/res/drawable/list_selector_selected_and_pressed.xml deleted file mode 100644 index d81ee36ea..000000000 --- a/InCallUI/res/drawable/list_selector_selected_and_pressed.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/InCallUI/res/layout/call_button_fragment.xml b/InCallUI/res/layout/call_button_fragment.xml index 9d8f743d9..3cfd87f3d 100644 --- a/InCallUI/res/layout/call_button_fragment.xml +++ b/InCallUI/res/layout/call_button_fragment.xml @@ -79,7 +79,7 @@ - @@ -105,7 +105,7 @@ @@ -118,7 +118,7 @@ diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java index 58cb6d879..2912ecefe 100644 --- a/InCallUI/src/com/android/incallui/CallButtonFragment.java +++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java @@ -45,7 +45,7 @@ public class CallButtonFragment private ImageButton mMuteButton; private ImageButton mAudioButton; private ImageButton mHoldButton; - private ToggleButton mShowDialpadButton; + private ImageButton mShowDialpadButton; private ImageButton mMergeButton; private ImageButton mAddCallButton; private ImageButton mSwapButton; @@ -123,7 +123,7 @@ public class CallButtonFragment } }); - mShowDialpadButton = (ToggleButton) parent.findViewById(R.id.dialpadButton); + mShowDialpadButton = (ImageButton) parent.findViewById(R.id.dialpadButton); mShowDialpadButton.setOnClickListener(this); mAddCallButton = (ImageButton) parent.findViewById(R.id.addButton); mAddCallButton.setOnClickListener(this); @@ -174,7 +174,7 @@ public class CallButtonFragment getPresenter().swapClicked(); break; case R.id.dialpadButton: - getPresenter().showDialpadClicked(mShowDialpadButton.isChecked()); + getPresenter().showDialpadClicked(!mShowDialpadButton.isSelected()); break; case R.id.auxiliaryActionButton: getPresenter().auxiliaryActionButtonClicked(); @@ -498,7 +498,7 @@ public class CallButtonFragment @Override public void displayDialpad(boolean value) { - mShowDialpadButton.setChecked(value); + mShowDialpadButton.setSelected(value); if (getActivity() != null && getActivity() instanceof InCallActivity) { ((InCallActivity) getActivity()).displayDialpad(value); } -- cgit v1.2.3