Fixed
Status Update
Comments
al...@google.com <al...@google.com>
ca...@google.com <ca...@google.com> #2
Or when changing to textView.textMetricsParamsCompat still crash.
private fun setAsyncText(textView: AppCompatTextView, text: String?) {
if (!text.isNullOrEmpty()) {
val textFuture = PrecomputedTextCompat.getTextFuture(text!!, textView.textMetricsParamsCompat, null)
textView.setTextFuture(textFuture) //Crash
}
}
private fun setAsyncText(textView: AppCompatTextView, text: String?) {
if (!text.isNullOrEmpty()) {
val textFuture = PrecomputedTextCompat.getTextFuture(text!!, textView.textMetricsParamsCompat, null)
textView.setTextFuture(textFuture) //Crash
}
}
ap...@google.com <ap...@google.com> #3
add this line :
textView.setLayoutDirection(ViewCompat.getLayoutDirection(textView));
before :
setTextFuture(....)
textView.setLayoutDirection(ViewCompat.getLayoutDirection(textView));
before :
setTextFuture(....)
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: