commit | e231abf4623dd97b75b35ded10e6016ca57e8668 | [log] [tgz] |
---|---|---|
author | wilsonshih <wilsonshih@google.com> | Wed Aug 24 14:38:04 2022 +0800 |
committer | wilsonshih <wilsonshih@google.com> | Mon Sep 12 18:21:03 2022 +0800 |
tree | 89c26c2cf8bdb9bba454cadaea3317527221097e | |
parent | d1ae957b6a39006d152af990ed5b36c623c2fa39 [diff] |
Create empty view for SplashScreenViewProvider#iconView if needed There can return nullable for SplashScreenView#getIconView, which allow developers to customize exit animation for solid color splash screen. Bug: 243457485 Test: SplashscreenParametrizedTest SplashScreenTests Change-Id: I4c323d4f9307af9759da548dcadcd7b8318ecf60
diff --git a/core/core-splashscreen/src/main/java/androidx/core/splashscreen/SplashScreenViewProvider.kt b/core/core-splashscreen/src/main/java/androidx/core/splashscreen/SplashScreenViewProvider.kt index 8a5a9e4..3fc305c 100644 --- a/core/core-splashscreen/src/main/java/androidx/core/splashscreen/SplashScreenViewProvider.kt +++ b/core/core-splashscreen/src/main/java/androidx/core/splashscreen/SplashScreenViewProvider.kt
@@ -122,7 +122,8 @@ override val splashScreenView get() = platformView - override val iconView get() = platformView.iconView!! + override val iconView: View + get() = if (platformView.iconView != null) platformView.iconView!! else View(activity) override val iconAnimationStartMillis: Long get() = platformView.iconAnimationStart?.toEpochMilli() ?: 0