From c1e92f689bd5e0c24c093782d5ea0a0aa58a73b5 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Wed, 5 Mar 2014 13:58:03 -0800 Subject: Restricted the tap target for "All Contacts" to the "All Contacts" button alone. DO NOT MERGE Bug: 13322769 Change-Id: Iea2bd8886efed50b5b5e463c6e9205af4ad97a6c (cherry picked from commit 950e3ebcf8059cb6fc2ce0d3a4e1df29be4540db) --- res/drawable/background_all_contacts.xml | 29 ++++++++++++++++++++++ res/drawable/background_favorites_menu.xml | 29 ---------------------- res/layout/phone_favorites_menu.xml | 8 +++--- res/values/colors.xml | 6 ++--- .../android/dialer/list/PhoneFavoriteFragment.java | 8 +++--- 5 files changed, 39 insertions(+), 41 deletions(-) create mode 100644 res/drawable/background_all_contacts.xml delete mode 100644 res/drawable/background_favorites_menu.xml diff --git a/res/drawable/background_all_contacts.xml b/res/drawable/background_all_contacts.xml new file mode 100644 index 000000000..0d3703f84 --- /dev/null +++ b/res/drawable/background_all_contacts.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/drawable/background_favorites_menu.xml b/res/drawable/background_favorites_menu.xml deleted file mode 100644 index 60933fd5e..000000000 --- a/res/drawable/background_favorites_menu.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/res/layout/phone_favorites_menu.xml b/res/layout/phone_favorites_menu.xml index 5f7a5a630..387ea5b3f 100644 --- a/res/layout/phone_favorites_menu.xml +++ b/res/layout/phone_favorites_menu.xml @@ -25,8 +25,7 @@ android:paddingRight="@dimen/favorites_menu_padding_horizontal" android:paddingTop="@dimen/favorites_menu_padding_top" android:paddingBottom="@dimen/favorites_menu_padding_bottom" - android:background="@drawable/background_favorites_menu" - android:addStatesFromChildren="true" + android:background="@color/favorites_menu_background_color" > - \ No newline at end of file diff --git a/res/values/colors.xml b/res/values/colors.xml index 5de0e02c0..e6fef3f05 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -92,11 +92,11 @@ #999999 - - #d6d6d6 + + #808080 - #ebebeb + #eeeeee #ffffff diff --git a/src/com/android/dialer/list/PhoneFavoriteFragment.java b/src/com/android/dialer/list/PhoneFavoriteFragment.java index 79dbe8c49..675a40f0d 100644 --- a/src/com/android/dialer/list/PhoneFavoriteFragment.java +++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java @@ -673,12 +673,12 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen /** * Prepares the favorites menu which contains the static label "Speed Dial" and the - * "All Contacts" button. Taps anywhere in the view take the user to "All Contacts". - * This emulates how the headers in Play Store work. + * "All Contacts" button. Sets the onClickListener for the "All Contacts" button. */ private void prepareFavoritesMenu(View favoritesMenu) { - // Set the onClick listener for the view to bring up the all contacts view. - favoritesMenu.setOnClickListener(new OnClickListener() { + Button allContactsButton = (Button) favoritesMenu.findViewById(R.id.all_contacts_button); + // Set the onClick listener for the button to bring up the all contacts view. + allContactsButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { showAllContacts(); -- cgit v1.2.3