Merge "Support persistent/transient asset variants in EDU tooltip." into tm-qpr-dev

This commit is contained in:
Brian Isganitis
2023-02-03 23:24:58 +00:00
committed by Android (Google) Code Review
16 changed files with 24 additions and 26 deletions
@@ -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" />
<TextView
android:id="@+id/splitscreen_text"
@@ -61,7 +59,6 @@
android:layout_height="@dimen/taskbar_edu_features_lottie_height"
android:layout_marginStart="@dimen/taskbar_edu_features_horizontal_spacing"
android:layout_marginTop="@dimen/taskbar_edu_tooltip_vertical_margin"
android:scaleType="centerCrop"
app:layout_constraintStart_toEndOf="@id/splitscreen_animation"
app:layout_constraintTop_toBottomOf="@id/title"
app:lottie_autoPlay="true"
@@ -84,13 +81,11 @@
android:layout_height="@dimen/taskbar_edu_features_lottie_height"
android:layout_marginStart="@dimen/taskbar_edu_features_horizontal_spacing"
android:layout_marginTop="@dimen/taskbar_edu_tooltip_vertical_margin"
android:scaleType="centerCrop"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/settings_animation"
app:layout_constraintTop_toBottomOf="@id/title"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/taskbar_edu_suggestions" />
app:lottie_loop="true" />
<TextView
android:id="@+id/suggestions_text"
@@ -31,7 +31,6 @@
android:layout_width="@dimen/taskbar_edu_swipe_lottie_width"
android:layout_height="@dimen/taskbar_edu_swipe_lottie_height"
android:layout_marginTop="@dimen/taskbar_edu_tooltip_vertical_margin"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -110,11 +110,22 @@ class TaskbarEduTooltipController(val activityContext: TaskbarActivityContext) :
tooltipStep = TOOLTIP_STEP_NONE
inflateTooltip(R.layout.taskbar_edu_features)
tooltip?.run {
findViewById<LottieAnimationView>(R.id.splitscreen_animation).supportLightTheme()
findViewById<LottieAnimationView>(R.id.suggestions_animation).supportLightTheme()
findViewById<LottieAnimationView>(R.id.settings_animation).supportLightTheme()
findViewById<View>(R.id.settings_edu).visibility =
if (DisplayController.isTransientTaskbar(activityContext)) GONE else VISIBLE
val splitscreenAnim = findViewById<LottieAnimationView>(R.id.splitscreen_animation)
val suggestionsAnim = findViewById<LottieAnimationView>(R.id.suggestions_animation)
val settingsAnim = findViewById<LottieAnimationView>(R.id.settings_animation)
val settingsEdu = findViewById<View>(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<View>(R.id.done_button)?.setOnClickListener { hide() }
if (DisplayController.isTransientTaskbar(activityContext)) {