Preview does not occupy full width
ArleyPereira opened this issue · comments
Preview does not occupy full width...
kottie = "1.9.6-alpha02"
@OptIn(ExperimentalResourceApi::class)
@Composable
private fun SplashContent(
navigateToHomeAuthScreen: () -> Unit
) {
var animation by remember { mutableStateOf("") }
LaunchedEffect(Unit) {
animation = Res.readBytes("files/splash.json").decodeToString()
}
val composition = rememberKottieComposition(
spec = KottieCompositionSpec.File(animation)
)
val animationState by animateKottieCompositionAsState(
composition = composition,
isPlaying = true
)
LaunchedEffect(animationState.isPlaying) {
if (animationState.isCompleted) {
navigateToHomeAuthScreen()
}
}
KottieAnimation(
modifier = Modifier
.fillMaxSize(),
composition = composition,
progress = { animationState.progress }
)
}
would you be able to provide the lottie file so I can check it out?
Can I send it on a private channel
@ArleyPereira yeah, you can dm on slack or check social links on my GitHub profile
@ismai117 Submitted by LinkedIn
@ArleyPereira I've added ContentScale to 1.9.6-alpha03, it fixes the problem you're facing.
KottieAnimation(
composition = composition,
progress = { animationState.progress },
modifier = modifier.fillMaxSize(),
contentScale = ContentScale.FillBounds
)