diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2019-04-19 01:46:51 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2019-04-23 14:26:44 -0700 |
commit | 77b3419ad55a4f9070cbe7d9dcb089dbc2b96114 (patch) | |
tree | 53a4fb742a984d775fc416185b148686db4e57a3 /quickstep/recents_ui_overrides/res | |
parent | c06e151e0fd7d1a968fed283c2db5f9873dbb80c (diff) | |
download | android_packages_apps_Trebuchet-77b3419ad55a4f9070cbe7d9dcb089dbc2b96114.tar.gz android_packages_apps_Trebuchet-77b3419ad55a4f9070cbe7d9dcb089dbc2b96114.tar.bz2 android_packages_apps_Trebuchet-77b3419ad55a4f9070cbe7d9dcb089dbc2b96114.zip |
Adding support for showing predicted apps as a floating row in all-apps
and overview
Bug: 130053407
Change-Id: Idb93a0ba6cfea8406f75ab86d9e0acde2fc04b3a
Diffstat (limited to 'quickstep/recents_ui_overrides/res')
7 files changed, 122 insertions, 0 deletions
diff --git a/quickstep/recents_ui_overrides/res/drawable/arrow_toast_rounded_background.xml b/quickstep/recents_ui_overrides/res/drawable/arrow_toast_rounded_background.xml new file mode 100644 index 000000000..52cc6fcb6 --- /dev/null +++ b/quickstep/recents_ui_overrides/res/drawable/arrow_toast_rounded_background.xml @@ -0,0 +1,19 @@ +<!-- + Copyright (C) 2018 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> + <solid android:color="?android:attr/colorAccent" /> + <corners android:radius="8dp" /> +</shape> diff --git a/quickstep/recents_ui_overrides/res/layout/arrow_toast.xml b/quickstep/recents_ui_overrides/res/layout/arrow_toast.xml new file mode 100644 index 000000000..b0f2b4bf8 --- /dev/null +++ b/quickstep/recents_ui_overrides/res/layout/arrow_toast.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2018 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<merge + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_height="wrap_content" + android:layout_width="wrap_content"> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingStart="24dp" + android:paddingEnd="4dp" + android:background="@drawable/arrow_toast_rounded_background" + android:layout_gravity="center_horizontal" + android:elevation="2dp" + android:orientation="horizontal"> + + <TextView + android:id="@+id/text" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_gravity="center_vertical" + android:textColor="@android:color/white" + android:textSize="16sp"/> + <ImageView + android:id="@+id/dismiss" + android:layout_width="40dp" + android:layout_height="40dp" + android:layout_gravity="center_vertical" + android:padding="10dp" + android:layout_marginStart="2dp" + android:layout_marginEnd="2dp" + android:alpha="0.7" + android:src="@drawable/ic_remove_no_shadow" + android:tint="@android:color/white" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:contentDescription="@string/accessibility_close_task"/> + </LinearLayout> + + <View + android:id="@+id/arrow" + android:elevation="2dp" + android:layout_width="10dp" + android:layout_height="8dp" + android:layout_marginTop="-2dp" + android:layout_gravity="center_horizontal"/> +</merge> diff --git a/quickstep/recents_ui_overrides/res/layout/floating_header_content.xml b/quickstep/recents_ui_overrides/res/layout/floating_header_content.xml new file mode 100644 index 000000000..b21c34b09 --- /dev/null +++ b/quickstep/recents_ui_overrides/res/layout/floating_header_content.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<merge xmlns:android="http://schemas.android.com/apk/res/android" > + + <com.android.launcher3.appprediction.PredictionRowView + android:id="@+id/prediction_row" + android:accessibilityPaneTitle="@string/title_app_suggestions" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + <com.android.launcher3.appprediction.AppsDividerView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/apps_divider_view" /> +</merge> diff --git a/quickstep/recents_ui_overrides/res/layout/prediction_load_progress.xml b/quickstep/recents_ui_overrides/res/layout/prediction_load_progress.xml new file mode 100644 index 000000000..20c400441 --- /dev/null +++ b/quickstep/recents_ui_overrides/res/layout/prediction_load_progress.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android" + style="?android:attr/progressBarStyleHorizontal" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_marginLeft="20dp" + android:layout_marginRight="20dp" + android:indeterminate="true" + android:indeterminateOnly="true" + android:indeterminateTint="?workspaceTextColor" /> diff --git a/quickstep/recents_ui_overrides/res/values/colors.xml b/quickstep/recents_ui_overrides/res/values/colors.xml index 1e8d0cc30..7426e3039 100644 --- a/quickstep/recents_ui_overrides/res/values/colors.xml +++ b/quickstep/recents_ui_overrides/res/values/colors.xml @@ -1,4 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <color name="chip_hint_foreground_color">#fff</color> + + <color name="all_apps_label_text">#61000000</color> + <color name="all_apps_label_text_dark">#61FFFFFF</color> + <color name="all_apps_prediction_row_separator">#3c000000</color> + <color name="all_apps_prediction_row_separator_dark">#3cffffff</color> </resources>
\ No newline at end of file diff --git a/quickstep/recents_ui_overrides/res/values/dimens.xml b/quickstep/recents_ui_overrides/res/values/dimens.xml index b654d5c90..f99143581 100644 --- a/quickstep/recents_ui_overrides/res/values/dimens.xml +++ b/quickstep/recents_ui_overrides/res/values/dimens.xml @@ -12,4 +12,13 @@ <dimen name="chip_text_top_padding">4dp</dimen> <dimen name="chip_text_start_padding">10dp</dimen> <dimen name="chip_text_size">14sp</dimen> + + <dimen name="all_apps_prediction_row_divider_height">17dp</dimen> + <dimen name="all_apps_label_top_padding">16dp</dimen> + <dimen name="all_apps_label_bottom_padding">8dp</dimen> + <dimen name="all_apps_label_text_size">14sp</dimen> + <dimen name="all_apps_tip_bottom_margin">8dp</dimen> + <!-- The size of corner radius of the arrow in the arrow toast. --> + <dimen name="arrow_toast_corner_radius">2dp</dimen> + </resources>
\ No newline at end of file diff --git a/quickstep/recents_ui_overrides/res/values/override.xml b/quickstep/recents_ui_overrides/res/values/override.xml index c60cf5ab6..1ddd3f594 100644 --- a/quickstep/recents_ui_overrides/res/values/override.xml +++ b/quickstep/recents_ui_overrides/res/values/override.xml @@ -21,6 +21,8 @@ <string name="instant_app_resolver_class" translatable="false">com.android.quickstep.InstantAppResolverImpl</string> + <string name="app_launch_tracker_class" translatable="false">com.android.launcher3.appprediction.PredictionAppTracker</string> + <string name="main_process_initializer_class" translatable="false">com.android.quickstep.QuickstepProcessInitializer</string> </resources> |