Fixed
Status Update
Comments
al...@google.com <al...@google.com>
ca...@google.com <ca...@google.com> #2
This will be fixed in alpha02
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 7d14fd070c7740087018b064c8f761432c3164ac
Author: Vadim Caen <caen@google.com>
Date: Wed Jul 21 19:58:00 2021
Support of splash screen icon background
- Added backward compatibility for the splash screen icon background.
- Also added minimal support API 21 to 23
- Fixes icon size and masking to match Android 12 behavior
Test: SplashScreenTests
Bug: 198161849
Fixes: 197759820
Fixes: 198165621
Relnote: "Added backward compatibility for the
windowSplashScreenIconBackgroundColor attribute"
Relnote: "Downgraded the minSdkVersion to API 21"
Change-Id: Idd05037fbc481ca80217c50b6e9bf64a16d90cd4
M core/core-splashscreen/src/androidTest/AndroidManifest.xml
A core/core-splashscreen/src/main/java/androidx/core/splashscreen/MaskedDrawable.kt
M core/core-splashscreen/src/androidTest/java/androidx/core/splashscreen/test/SplashscreenParametrizedTest.kt
M core/core-splashscreen/src/androidTest/res/values/colors.xml
A core/core-splashscreen/src/main/res/drawable/icon_background.xml
M core/core-splashscreen/src/main/res/values/attrs.xml
M core/core-splashscreen/src/androidTest/java/androidx/core/splashscreen/test/SplashScreenTestController.kt
M core/core-splashscreen/src/main/java/androidx/core/splashscreen/SplashScreenViewProvider.kt
M core/core-splashscreen/src/main/res/values-v31/styles.xml
A core/core-splashscreen/src/main/res/drawable-v23/compat_splash_screen_no_icon_background.xml
M core/core-splashscreen/src/main/res/layout/splash_screen_view.xml
M core/core-splashscreen/src/main/res/values/public.xml
M core/core-splashscreen/src/main/res/drawable-v23/compat_splash_screen.xml
M core/core-splashscreen/build.gradle
M core/core-splashscreen/src/androidTest/java/androidx/core/splashscreen/test/SplashScreenTestActivities.kt
A core/core-splashscreen/src/main/res/drawable/compat_splash_screen_no_icon_background.xml
M core/core-splashscreen/src/main/res/values/dimens.xml
A core/core-splashscreen/src/androidTest/java/androidx/core/splashscreen/test/SplashScreenTests.kt
M core/core-splashscreen/src/androidTest/res/drawable/android.xml
M core/core-splashscreen/src/main/res/values/styles.xml
M core/core-splashscreen/src/main/java/androidx/core/splashscreen/SplashScreen.kt
M core/core-splashscreen/api/res-current.txt
M core/core-splashscreen/src/androidTest/res/values/styles.xml
A core/core-splashscreen/src/androidTest/java/androidx/core/splashscreen/test/SplashScreenTestUtils.kt
https://android-review.googlesource.com/1795729
Branch: androidx-main
commit 7d14fd070c7740087018b064c8f761432c3164ac
Author: Vadim Caen <caen@google.com>
Date: Wed Jul 21 19:58:00 2021
Support of splash screen icon background
- Added backward compatibility for the splash screen icon background.
- Also added minimal support API 21 to 23
- Fixes icon size and masking to match Android 12 behavior
Test: SplashScreenTests
Bug: 198161849
Fixes: 197759820
Fixes: 198165621
Relnote: "Added backward compatibility for the
windowSplashScreenIconBackgroundColor attribute"
Relnote: "Downgraded the minSdkVersion to API 21"
Change-Id: Idd05037fbc481ca80217c50b6e9bf64a16d90cd4
M core/core-splashscreen/src/androidTest/AndroidManifest.xml
A core/core-splashscreen/src/main/java/androidx/core/splashscreen/MaskedDrawable.kt
M core/core-splashscreen/src/androidTest/java/androidx/core/splashscreen/test/SplashscreenParametrizedTest.kt
M core/core-splashscreen/src/androidTest/res/values/colors.xml
A core/core-splashscreen/src/main/res/drawable/icon_background.xml
M core/core-splashscreen/src/main/res/values/attrs.xml
M core/core-splashscreen/src/androidTest/java/androidx/core/splashscreen/test/SplashScreenTestController.kt
M core/core-splashscreen/src/main/java/androidx/core/splashscreen/SplashScreenViewProvider.kt
M core/core-splashscreen/src/main/res/values-v31/styles.xml
A core/core-splashscreen/src/main/res/drawable-v23/compat_splash_screen_no_icon_background.xml
M core/core-splashscreen/src/main/res/layout/splash_screen_view.xml
M core/core-splashscreen/src/main/res/values/public.xml
M core/core-splashscreen/src/main/res/drawable-v23/compat_splash_screen.xml
M core/core-splashscreen/build.gradle
M core/core-splashscreen/src/androidTest/java/androidx/core/splashscreen/test/SplashScreenTestActivities.kt
A core/core-splashscreen/src/main/res/drawable/compat_splash_screen_no_icon_background.xml
M core/core-splashscreen/src/main/res/values/dimens.xml
A core/core-splashscreen/src/androidTest/java/androidx/core/splashscreen/test/SplashScreenTests.kt
M core/core-splashscreen/src/androidTest/res/drawable/android.xml
M core/core-splashscreen/src/main/res/values/styles.xml
M core/core-splashscreen/src/main/java/androidx/core/splashscreen/SplashScreen.kt
M core/core-splashscreen/api/res-current.txt
M core/core-splashscreen/src/androidTest/res/values/styles.xml
A core/core-splashscreen/src/androidTest/java/androidx/core/splashscreen/test/SplashScreenTestUtils.kt
Description
Component used: SplashScreen compat library (androidx.core:core-splashscreen) Version used: 1.0.0-alpha01 Devices/Android versions reproduced on: Pixel 4a emulator (Android 11), real Pixel 4a (Android 11.
The following code works to slide the splash screen up and fade it out:
See the first video for a demo.
However, if this is combined with Jetpack Compose by also calling
setContent
inonCreate
, the custom animation is no longer played, assetContent
simply replaces the view when it is finished loading. See the second video for a demo.The alternative would be to call
setContent
in the callback ofwithEndAction
, but this is suboptimal. See the third video for a demo.If this is a bug in the library, we would appreciate if you could attach: