From 43a7b18f218e6a87b78867be2fe3fa693d1d9ca8 Mon Sep 17 00:00:00 2001 From: Raff Tsai Date: Tue, 28 Aug 2018 22:02:29 +0800 Subject: [PATCH] Modify Settings homepage layout - Add BottomNavigationView which has two tabs - Remove BottomSheet in layout files Change-Id: I493290fa9dee0566c73c5c9d7fbba10b71b4e2b4 Fixes: 113266753 Test: visual --- color-check-baseline.xml | 44 ++-- res/color/bottom_navigation_colors.xml | 25 +++ res/drawable/ic_list_24dp.xml | 24 --- res/drawable/ic_settings_all.xml | 26 +++ res/drawable/ic_settings_personal.xml | 28 +++ res/layout/settings_homepage.xml | 60 +----- res/layout/settings_homepage_container.xml | 38 +++- res/menu/home_bottom_navigation.xml | 27 +++ res/values/strings.xml | 6 + res/values/themes.xml | 1 + .../settings/SettingsHomepageActivity.java | 63 ++++-- .../settings/homepage/HomepageFragment.java | 196 ------------------ .../homepage/PersonalSettingsFragment.java | 69 ++++++ .../search/SearchFeatureProvider.java | 8 +- 14 files changed, 295 insertions(+), 320 deletions(-) create mode 100644 res/color/bottom_navigation_colors.xml delete mode 100644 res/drawable/ic_list_24dp.xml create mode 100644 res/drawable/ic_settings_all.xml create mode 100644 res/drawable/ic_settings_personal.xml create mode 100644 res/menu/home_bottom_navigation.xml delete mode 100644 src/com/android/settings/homepage/HomepageFragment.java create mode 100644 src/com/android/settings/homepage/PersonalSettingsFragment.java diff --git a/color-check-baseline.xml b/color-check-baseline.xml index d72aaa8109a..4b36b507ee1 100644 --- a/color-check-baseline.xml +++ b/color-check-baseline.xml @@ -29,22 +29,6 @@ column="9"/> - - - - @@ -2441,7 +2425,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~"> @@ -2457,7 +2441,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~"> @@ -2473,7 +2457,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~"> @@ -2489,7 +2473,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~"> @@ -2505,7 +2489,7 @@ errorLine2=" ~~~~~~~~~~~~~~~~~~~"> @@ -2701,6 +2685,22 @@ column="49"/> + + + + + + + + + + \ No newline at end of file diff --git a/res/drawable/ic_list_24dp.xml b/res/drawable/ic_list_24dp.xml deleted file mode 100644 index 03f4af0ba5d..00000000000 --- a/res/drawable/ic_list_24dp.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/res/drawable/ic_settings_all.xml b/res/drawable/ic_settings_all.xml new file mode 100644 index 00000000000..03958abe13b --- /dev/null +++ b/res/drawable/ic_settings_all.xml @@ -0,0 +1,26 @@ + + + + + + diff --git a/res/drawable/ic_settings_personal.xml b/res/drawable/ic_settings_personal.xml new file mode 100644 index 00000000000..5139405fb2b --- /dev/null +++ b/res/drawable/ic_settings_personal.xml @@ -0,0 +1,28 @@ + + + + + + diff --git a/res/layout/settings_homepage.xml b/res/layout/settings_homepage.xml index f1555eefd7f..035e8b486cd 100644 --- a/res/layout/settings_homepage.xml +++ b/res/layout/settings_homepage.xml @@ -15,62 +15,8 @@ limitations under the License. --> - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + android:layout_height="wrap_content" /> diff --git a/res/layout/settings_homepage_container.xml b/res/layout/settings_homepage_container.xml index 84511f2b65b..b35b4ced254 100644 --- a/res/layout/settings_homepage_container.xml +++ b/res/layout/settings_homepage_container.xml @@ -15,8 +15,38 @@ limitations under the License. --> - \ No newline at end of file + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + + + + + + \ No newline at end of file diff --git a/res/menu/home_bottom_navigation.xml b/res/menu/home_bottom_navigation.xml new file mode 100644 index 00000000000..c58efd766a7 --- /dev/null +++ b/res/menu/home_bottom_navigation.xml @@ -0,0 +1,27 @@ + + + + + + + diff --git a/res/values/strings.xml b/res/values/strings.xml index 7eb1dacc4af..850ce8be12b 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -10078,4 +10078,10 @@ Enable Virtual High Frequency Panel + + All Settings + + + Your Settings + diff --git a/res/values/themes.xml b/res/values/themes.xml index 7fd0dcc45b0..4bd6f522997 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -167,6 +167,7 @@