lottie-android
lottie-android copied to clipboard
Animation with Adobe After Effects files that consist of png images does not support system scale changes
Lottie is supported and developed on nights and weekends. Issues from Lottie sponsors will be prioritized.
If you don't use this template, your issue will be closed. Delete this text once completed.
Checklist
- My animation doesn't use any unsupported features.
- I know what part of my animation doesn't work.
- I have created a simplified version of my animation
- I have attached the AEP file (as a zip file so it can be attached) that only has the part of the animation that doesn't work.
Describe the bug
Any animations with Adobe After Effects files that consist of png images do not support system scaling
What version of Lottie did you test this on?
lottie-compose:5.2.0
What version of Android did you test this on?
Android 10/13, but I think it doesn't depend on the Android version
Steps To Reproduce
Steps to reproduce the behavior:
- Run any animation with Adobe After Effects files that consist of png images (ex: https://lottiefiles.com/131823-investment) screenshot 1
- Go to system settings and change the scale settings of user interface screenshot 2
- Go back to app screenshot 3
- See error
Code
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val animation = "https://assets9.lottiefiles.com/packages/lf20_dnGoCmSHJx.json"
setContent {
LottieTestTheme {
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colors.background
) {
val composition by rememberLottieComposition(
spec = LottieCompositionSpec.Url(animation)
)
LottieAnimation(
composition = composition,
iterations = LottieConstants.IterateForever,
contentScale = ContentScale.FillWidth,
alignment = Alignment.TopCenter,
modifier = Modifier.fillMaxSize()
)
}
}
}
}
}
I'm experiencing the same issue. I'm using version 6.2.0, and after changing the system scale, there's a rendering issue, but force-quitting the app and relaunching it makes it work normally.
@gpeal
It is the same even if you upgrade to 6.3.0.
My code is like this, and the video is attached.
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val animation = "https://lottie.host/8eda8418-db8e-42a7-be06-c6208ffb03b4/3yH617QvMP.json"
setContent {
LottieTestTheme {
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colors.background
) {
val composition by rememberLottieComposition(
spec = LottieCompositionSpec.Url(animation)
)
LottieAnimation(
composition = composition,
iterations = LottieConstants.IterateForever,
contentScale = ContentScale.FillWidth,
alignment = Alignment.TopCenter,
modifier = Modifier.fillMaxSize()
)
}
}
}
}
}
SAMPLE 1 | SAMPLE 2 |
---|---|