From 86e21f733049560e77b92f17a58474312d72ec3e Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Wed, 2 Apr 2014 16:49:38 -0700 Subject: Add actionbar to Dialer Initial changes to replace the fake actionbar affordances in Dialer with an actual actionBar. This puts the dialer in an intermediate hybrid state where we are now using the system actionbar for search, but the searchview is not yet themed to look like our old search bar, so this is definitely still WIP UI. This CL retains the fake action bar at the bottom of the screen to continue allowing quick access to call history while other changes are underway, but replaces the searchview and the overflow menu with framework provided actionbar functionality. Other related changes: * The searchview (in the top actionbar) is hidden when scrolling to devote the entire screen area to the speeddial list https://folio.googleplex.com/phone/L/0407/#/03.png * Functionality provided by the fake overflow menu has been moved to the real actionbar overflow menu * Various modifications to child fragments/listviews to take into account the existence of an actionbar * Cleaned up unneeded styles and related-dead code Bug: 13933082 Change-Id: Ifd855bd67af7bf2d2a403ef9556ade54e8d57ee6 --- AndroidManifest.xml | 11 +- res/layout/all_contacts_activity.xml | 1 - res/layout/call_log_activity.xml | 4 +- res/layout/dialpad_fragment.xml | 6 +- res/layout/dialtacts_activity.xml | 215 +++++----- res/layout/phone_favorites_fragment.xml | 2 +- res/menu/dialtacts_options.xml | 10 + res/values/styles.xml | 27 +- res/xml/searchable.xml | 22 + src/com/android/dialer/DialtactsActivity.java | 444 +++++++++------------ .../android/dialer/dialpad/DialpadFragment.java | 4 +- .../list/OnListFragmentScrolledListener.java | 2 + .../android/dialer/list/PhoneFavoriteFragment.java | 5 +- src/com/android/dialer/list/SearchFragment.java | 16 +- 14 files changed, 353 insertions(+), 416 deletions(-) create mode 100644 res/xml/searchable.xml diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 509960c2b..ab3d2e3a4 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -68,7 +68,7 @@ dialpad screen. --> + + + + @@ -139,7 +144,7 @@ diff --git a/res/layout/all_contacts_activity.xml b/res/layout/all_contacts_activity.xml index a91302711..50cba1eca 100644 --- a/res/layout/all_contacts_activity.xml +++ b/res/layout/all_contacts_activity.xml @@ -17,7 +17,6 @@ + android:layout_height="match_parent"/> diff --git a/res/layout/dialpad_fragment.xml b/res/layout/dialpad_fragment.xml index dfe5c7c84..d285cc313 100644 --- a/res/layout/dialpad_fragment.xml +++ b/res/layout/dialpad_fragment.xml @@ -49,7 +49,7 @@ android:layout_width="match_parent" android:layout_height="10dp" /> - + - - - - - - + + - - - + + + + + - - - - - - - - - - - - - - - - - - - - + + + + - - - - + android:layout_height="56dp" + android:id="@+id/remove_view_container" + android:orientation="horizontal" + android:gravity="center"> + + + + + + diff --git a/res/layout/phone_favorites_fragment.xml b/res/layout/phone_favorites_fragment.xml index 49924863a..91acb9058 100644 --- a/res/layout/phone_favorites_fragment.xml +++ b/res/layout/phone_favorites_fragment.xml @@ -35,7 +35,7 @@ android:id="@+id/contact_tile_list" android:layout_width="match_parent" android:layout_height="match_parent" - android:paddingTop="@dimen/contact_tile_list_padding_top" + android:paddingTop="?android:attr/actionBarSize" android:clipToPadding="false" android:fadingEdge="none" android:divider="@null" /> diff --git a/res/menu/dialtacts_options.xml b/res/menu/dialtacts_options.xml index 7e84818a1..71d095a14 100644 --- a/res/menu/dialtacts_options.xml +++ b/res/menu/dialtacts_options.xml @@ -14,6 +14,16 @@ limitations under the License. --> + + diff --git a/res/values/styles.xml b/res/values/styles.xml index 78c1cc7a8..71859f091 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -19,7 +19,8 @@ parent="android:Theme.Quantum.Light"> @color/dialtacts_primary_text_color @color/dialtacts_secondary_text_color - false + true + true @style/DialtactsActionBarStyle @style/DialtactsActionBarTabStyle @@ -29,8 +30,6 @@ @style/DialtactsActionBarTabTextStyle @style/DialtactsActionBarOverflow - - @drawable/ic_back_arrow @null @style/DialtactsSearchboxStyle @@ -77,23 +76,6 @@ ?android:attr/actionBarSize - - - - - - - - -