From 46ec655db583182aee9338c5e2630acf90cb0b85 Mon Sep 17 00:00:00 2001 From: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Date: Wed, 19 Jan 2022 05:51:14 +0700 Subject: [PATCH] Update core-splashscreen (#6471) --- app/build.gradle.kts | 2 +- .../main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8e11ae61c..bb4e75642 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -154,7 +154,7 @@ dependencies { implementation("androidx.constraintlayout:constraintlayout:2.1.2") implementation("androidx.coordinatorlayout:coordinatorlayout:1.2.0-rc01") implementation("androidx.core:core-ktx:1.8.0-alpha02") - implementation("androidx.core:core-splashscreen:1.0.0-alpha02") + implementation("androidx.core:core-splashscreen:1.0.0-beta01") implementation("androidx.recyclerview:recyclerview:1.3.0-alpha01") implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01") implementation("androidx.viewpager:viewpager:1.1.0-alpha01") diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index a97d9eb40..01ecfad5a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -141,7 +141,7 @@ class MainActivity : BaseViewBindingActivity() { } val startTime = System.currentTimeMillis() - splashScreen?.setKeepVisibleCondition { + splashScreen?.setKeepOnScreenCondition() { val elapsed = System.currentTimeMillis() - startTime elapsed <= SPLASH_MIN_DURATION || (!ready && elapsed <= SPLASH_MAX_DURATION) } @@ -293,9 +293,6 @@ class MainActivity : BaseViewBindingActivity() { window.navigationBarColor = Color.TRANSPARENT splashScreen.setOnExitAnimationListener { splashProvider -> - // For some reason the SplashScreen applies (incorrect) Y translation to the iconView - splashProvider.iconView.translationY = 0F - val activityAnim = ValueAnimator.ofFloat(1F, 0F).apply { interpolator = LinearOutSlowInInterpolator() duration = SPLASH_EXIT_ANIM_DURATION