Closed JanB97 closed 1 year ago
I would very much like to know as well? Been struggling with it for more than 3 days now
You can use Glide's GlideImage
by implementation com.github.bumptech.glide:compose:1.0.0-alpha.6
Like this
@OptIn(ExperimentalGlideComposeApi::class)
@Composable
fun AnimationDemo() {
Column(
modifier = Modifier
.verticalScroll(rememberScrollState())
.fillMaxWidth()
.fillMaxHeight()
.padding(20.dp)
) {
GlideImage(
model = "file:///android_asset/1.webp",
contentDescription = "Test",
)
GlideImage(
model = "file:///android_asset/test1.png",
contentDescription = "Test",
)
GlideImage(
model = "file:///android_asset/2.gif",
contentDescription = "Test",
)
}
}
You can refer to the following file: https://github.com/penfeizhou/APNG4Android/blob/master/app/src/main/java/com/github/penfeizhou/animation/demo/ComposeActivity.kt
Not an issue, but is there a way to use this with compose?