From ef7f874a889b609bd34e692b9c9a1f8cefd1ea95 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Thu, 4 Jun 2015 17:18:17 -0700 Subject: Refactoring all apps search to support external search bar. - Adding support for an external search bar that can be used to search a container view. This adds a new interface AllAppsSearchController which manages the external search bar. Each controller will have its own search implementation which means that we no longer need a common AppSearchManager interface. - Removing elevation controller as we no longer have a builtin search bar in all apps - Refactoring container view insets so that they behave the same in all containers. - Refactoring apps view to ensure that we only update the number of columns with the available width - Cleaning up LauncherCallbacks interface Bug: 20127840 Bug: 21494973 Change-Id: I710b8e18196961d77d8a29f0c345531d480936fe --- res/drawable/all_apps_search_bg.xml | 11 ++--- res/layout-sw600dp/all_apps.xml | 33 --------------- res/layout/all_apps.xml | 40 ++++++++++++++----- res/layout/all_apps_container.xml | 80 +++++-------------------------------- res/layout/all_apps_reveal.xml | 24 ----------- res/layout/all_apps_search_bar.xml | 72 +++++++++++++++++++++++++++++++++ res/layout/widgets_view.xml | 22 +++++----- res/values-sw600dp/dimens.xml | 1 - res/values/dimens.xml | 9 +++-- 9 files changed, 135 insertions(+), 157 deletions(-) delete mode 100644 res/layout-sw600dp/all_apps.xml delete mode 100644 res/layout/all_apps_reveal.xml create mode 100644 res/layout/all_apps_search_bar.xml (limited to 'res') diff --git a/res/drawable/all_apps_search_bg.xml b/res/drawable/all_apps_search_bg.xml index 57eb5825e..a09f88fd4 100644 --- a/res/drawable/all_apps_search_bg.xml +++ b/res/drawable/all_apps_search_bg.xml @@ -14,10 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - \ No newline at end of file + \ No newline at end of file diff --git a/res/layout-sw600dp/all_apps.xml b/res/layout-sw600dp/all_apps.xml deleted file mode 100644 index 368e6abdd..000000000 --- a/res/layout-sw600dp/all_apps.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml index b907c34f1..1bf54eefb 100644 --- a/res/layout/all_apps.xml +++ b/res/layout/all_apps.xml @@ -21,15 +21,37 @@ android:id="@+id/apps_view" android:layout_width="match_parent" android:layout_height="match_parent" - android:descendantFocusability="afterDescendants"> - + + + - + + + android:layout_height="0dp" + android:layout_weight="1"> + + + \ No newline at end of file diff --git a/res/layout/all_apps_container.xml b/res/layout/all_apps_container.xml index fc77cd31f..5801a0e8e 100644 --- a/res/layout/all_apps_container.xml +++ b/res/layout/all_apps_container.xml @@ -14,95 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. --> + + android:focusable="true" + android:focusableInTouchMode="true"> + android:focusable="true" + android:descendantFocusability="afterDescendants" /> - - - - - - - - - - - - - - \ No newline at end of file diff --git a/res/layout/all_apps_reveal.xml b/res/layout/all_apps_reveal.xml deleted file mode 100644 index 5f4665642..000000000 --- a/res/layout/all_apps_reveal.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - \ No newline at end of file diff --git a/res/layout/all_apps_search_bar.xml b/res/layout/all_apps_search_bar.xml new file mode 100644 index 000000000..9f4e3228c --- /dev/null +++ b/res/layout/all_apps_search_bar.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/widgets_view.xml b/res/layout/widgets_view.xml index a1a62b32a..c27e79bbd 100644 --- a/res/layout/widgets_view.xml +++ b/res/layout/widgets_view.xml @@ -21,25 +21,29 @@ android:id="@+id/widgets_view" android:layout_width="match_parent" android:layout_height="match_parent" - android:paddingTop="@dimen/widget_container_inset" - android:paddingBottom="@dimen/widget_container_inset" + android:orientation="vertical" android:descendantFocusability="afterDescendants"> + android:layout_height="match_parent"> + + \ No newline at end of file diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml index daa98ef0b..2651fbb3f 100644 --- a/res/values-sw600dp/dimens.xml +++ b/res/values-sw600dp/dimens.xml @@ -16,7 +16,6 @@ - 18dp 0dp 26sp 12dp diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 2184eadb3..0311a8977 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -51,17 +51,18 @@ - 8dp + 8dp + + 4dp - 8dp 56dp 8dp 24sp - 52dp + 48dp 8dp 8dp 24dp - 16dp + 16dp 4dp -16dp -- cgit v1.2.3