[#329] AndroidX Updates

Updated to use the latest splash screen API
This commit is contained in:
Carter Jernigan 2022-04-04 08:48:47 -04:00 committed by Carter Jernigan
parent 3844d9987c
commit c0a5d2607c
2 changed files with 6 additions and 6 deletions

View File

@ -72,7 +72,7 @@ PLAY_PUBLISHER_PLUGIN_VERSION_MATCHER=3.7.0
ANDROIDX_ACTIVITY_VERSION=1.4.0 ANDROIDX_ACTIVITY_VERSION=1.4.0
ANDROIDX_ANNOTATION_VERSION=1.3.0 ANDROIDX_ANNOTATION_VERSION=1.3.0
ANDROIDX_APPCOMPAT_VERSION=1.3.1 ANDROIDX_APPCOMPAT_VERSION=1.4.1
ANDROIDX_COMPOSE_COMPILER_VERSION=1.1.0 ANDROIDX_COMPOSE_COMPILER_VERSION=1.1.0
ANDROIDX_COMPOSE_MATERIAL3_VERSION=1.0.0-alpha05 ANDROIDX_COMPOSE_MATERIAL3_VERSION=1.0.0-alpha05
ANDROIDX_COMPOSE_VERSION=1.1.0 ANDROIDX_COMPOSE_VERSION=1.1.0
@ -81,11 +81,11 @@ ANDROIDX_ESPRESSO_VERSION=3.4.0
ANDROIDX_LIFECYCLE_VERSION=2.4.1 ANDROIDX_LIFECYCLE_VERSION=2.4.1
ANDROIDX_NAVIGATION_COMPOSE_VERSION=2.4.1 ANDROIDX_NAVIGATION_COMPOSE_VERSION=2.4.1
ANDROIDX_SECURITY_CRYPTO_VERSION=1.1.0-alpha03 ANDROIDX_SECURITY_CRYPTO_VERSION=1.1.0-alpha03
ANDROIDX_SPLASH_SCREEN_VERSION=1.0.0-alpha02 ANDROIDX_SPLASH_SCREEN_VERSION=1.0.0-beta02
ANDROIDX_TEST_JUNIT_VERSION=1.1.3 ANDROIDX_TEST_JUNIT_VERSION=1.1.3
ANDROIDX_TEST_ORCHESTRATOR_VERSION=1.4.1 ANDROIDX_TEST_ORCHESTRATOR_VERSION=1.4.1
ANDROIDX_TEST_CORE_VERSION=1.4.1-alpha04 ANDROIDX_TEST_CORE_VERSION=1.4.1-alpha05
ANDROIDX_TEST_RUNNER_VERSION=1.5.0-alpha01 ANDROIDX_TEST_RUNNER_VERSION=1.5.0-alpha02
ANDROIDX_UI_AUTOMATOR_VERSION=2.2.0-alpha1 ANDROIDX_UI_AUTOMATOR_VERSION=2.2.0-alpha1
ANDROIDX_WORK_MANAGER_VERSION=2.7.1 ANDROIDX_WORK_MANAGER_VERSION=2.7.1
CORE_LIBRARY_DESUGARING_VERSION=1.1.5 CORE_LIBRARY_DESUGARING_VERSION=1.1.5

View File

@ -82,13 +82,13 @@ class MainActivity : ComponentActivity() {
val splashScreen = installSplashScreen() val splashScreen = installSplashScreen()
val start = SystemClock.elapsedRealtime().milliseconds val start = SystemClock.elapsedRealtime().milliseconds
splashScreen.setKeepVisibleCondition { splashScreen.setKeepOnScreenCondition {
if (SPLASH_SCREEN_DELAY > Duration.ZERO) { if (SPLASH_SCREEN_DELAY > Duration.ZERO) {
val now = SystemClock.elapsedRealtime().milliseconds val now = SystemClock.elapsedRealtime().milliseconds
// This delay is for debug purposes only; do not enable for production usage. // This delay is for debug purposes only; do not enable for production usage.
if (now - start < SPLASH_SCREEN_DELAY) { if (now - start < SPLASH_SCREEN_DELAY) {
return@setKeepVisibleCondition true return@setKeepOnScreenCondition true
} }
} }