From 720dcd2d3bc0cd43942464087587fbf5e331ae11 Mon Sep 17 00:00:00 2001 From: Brian Isganitis Date: Thu, 2 Feb 2023 14:15:47 -0800 Subject: [PATCH] Support persistent/transient asset variants in EDU tooltip. Test: Manual Fix: 267384293 Change-Id: Ia4aefb7d0e9bf675355ea52f657f78b7533eeb98 --- quickstep/res/layout/taskbar_edu_features.xml | 9 ++------ quickstep/res/layout/taskbar_edu_swipe.xml | 1 - .../taskbar_edu_splitscreen_persistent.json | 1 - .../taskbar_edu_splitscreen_transient.json | 1 - .../taskbar_edu_stashing_transient.json | 1 - .../taskbar_edu_suggestions_persistent.json | 1 - .../taskbar_edu_suggestions_transient.json | 1 - quickstep/res/raw/taskbar_edu_settings.json | 2 +- .../res/raw/taskbar_edu_splitscreen.json | 1 - .../taskbar_edu_splitscreen_persistent.json | 2 +- .../taskbar_edu_splitscreen_transient.json | 2 +- quickstep/res/raw/taskbar_edu_stashing.json | 2 +- .../res/raw/taskbar_edu_suggestions.json | 1 - .../taskbar_edu_suggestions_persistent.json | 2 +- .../taskbar_edu_suggestions_transient.json | 2 +- .../taskbar/TaskbarEduTooltipController.kt | 21 ++++++++++++++----- 16 files changed, 24 insertions(+), 26 deletions(-) delete mode 100644 quickstep/res/raw-night/taskbar_edu_splitscreen_persistent.json delete mode 100644 quickstep/res/raw-night/taskbar_edu_splitscreen_transient.json delete mode 100644 quickstep/res/raw-night/taskbar_edu_stashing_transient.json delete mode 100644 quickstep/res/raw-night/taskbar_edu_suggestions_persistent.json delete mode 100644 quickstep/res/raw-night/taskbar_edu_suggestions_transient.json delete mode 100644 quickstep/res/raw/taskbar_edu_splitscreen.json delete mode 100644 quickstep/res/raw/taskbar_edu_suggestions.json diff --git a/quickstep/res/layout/taskbar_edu_features.xml b/quickstep/res/layout/taskbar_edu_features.xml index ed8cfb10b1..4137df753d 100644 --- a/quickstep/res/layout/taskbar_edu_features.xml +++ b/quickstep/res/layout/taskbar_edu_features.xml @@ -32,12 +32,10 @@ android:layout_width="@dimen/taskbar_edu_features_lottie_width" android:layout_height="@dimen/taskbar_edu_features_lottie_height" android:layout_marginTop="@dimen/taskbar_edu_tooltip_vertical_margin" - android:scaleType="centerCrop" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/title" app:lottie_autoPlay="true" - app:lottie_loop="true" - app:lottie_rawRes="@raw/taskbar_edu_splitscreen" /> + app:lottie_loop="true" /> + app:lottie_loop="true" /> (R.id.splitscreen_animation).supportLightTheme() - findViewById(R.id.suggestions_animation).supportLightTheme() - findViewById(R.id.settings_animation).supportLightTheme() - findViewById(R.id.settings_edu).visibility = - if (DisplayController.isTransientTaskbar(activityContext)) GONE else VISIBLE + val splitscreenAnim = findViewById(R.id.splitscreen_animation) + val suggestionsAnim = findViewById(R.id.suggestions_animation) + val settingsAnim = findViewById(R.id.settings_animation) + val settingsEdu = findViewById(R.id.settings_edu) + splitscreenAnim.supportLightTheme() + suggestionsAnim.supportLightTheme() + settingsAnim.supportLightTheme() + if (DisplayController.isTransientTaskbar(activityContext)) { + splitscreenAnim.setAnimation(R.raw.taskbar_edu_splitscreen_transient) + suggestionsAnim.setAnimation(R.raw.taskbar_edu_suggestions_transient) + settingsEdu.visibility = GONE + } else { + splitscreenAnim.setAnimation(R.raw.taskbar_edu_splitscreen_persistent) + suggestionsAnim.setAnimation(R.raw.taskbar_edu_suggestions_persistent) + settingsEdu.visibility = VISIBLE + } findViewById(R.id.done_button)?.setOnClickListener { hide() } if (DisplayController.isTransientTaskbar(activityContext)) {