From 314761a80819a6e64a136161f51eebb0f0528c4d Mon Sep 17 00:00:00 2001 From: Samuel Fufa Date: Wed, 14 Oct 2020 10:15:07 -0700 Subject: [PATCH] Setup SearchResultIcon for single cell results SearchResultIcon will be able to render apps, shortcuts and remote actions. It can also handle its own focused state drawing. Screenshot: https://screenshot.googleplex.com/C3KgjJtLQTBPgaf Bug: 170752716 Test: Manual Change-Id: I460a9c128ea3f5814784e342c5d5fa5b7e310882 --- AndroidManifest-common.xml | 1 + res/layout/all_apps_icon.xml | 15 +-- res/layout/search_result_icon.xml | 20 ++++ res/values/styles.xml | 10 ++ src/com/android/launcher3/BubbleTextView.java | 71 +++++++++++- .../launcher3/allapps/AllAppsGridAdapter.java | 69 +++--------- .../allapps/AllAppsSectionDecorator.java | 23 +++- .../launcher3/allapps/AllAppsStore.java | 16 +++ .../allapps/search/SearchEventTracker.java | 4 +- .../launcher3/views/HeroSearchResultView.java | 13 +-- .../android/launcher3/views/ScrimView.java | 2 +- .../launcher3/views/SearchResultIcon.java | 103 ++++++++++++++++++ .../launcher3/views/SearchResultIconRow.java | 10 ++ 13 files changed, 277 insertions(+), 80 deletions(-) create mode 100644 res/layout/search_result_icon.xml create mode 100644 src/com/android/launcher3/views/SearchResultIcon.java diff --git a/AndroidManifest-common.xml b/AndroidManifest-common.xml index 97e3786a36..a47a500b8e 100644 --- a/AndroidManifest-common.xml +++ b/AndroidManifest-common.xml @@ -30,6 +30,7 @@ with some minor changed based on the derivative app. --> + diff --git a/res/layout/all_apps_icon.xml b/res/layout/all_apps_icon.xml index 79fb6126ad..069954c56b 100644 --- a/res/layout/all_apps_icon.xml +++ b/res/layout/all_apps_icon.xml @@ -1,5 +1,4 @@ - - - + launcher:centerVertically="true" /> diff --git a/res/layout/search_result_icon.xml b/res/layout/search_result_icon.xml new file mode 100644 index 0000000000..3c1dd49109 --- /dev/null +++ b/res/layout/search_result_icon.xml @@ -0,0 +1,20 @@ + + + + diff --git a/res/values/styles.xml b/res/values/styles.xml index fd3d873635..067cf7feac 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -223,6 +223,16 @@ 1 + + + +