Open thePlebDev opened 5 days ago
here is the code that will allow the gif animation support:
@Composable fun GifLoadingAnimation(){ val context = LocalContext.current val imageLoader = ImageLoader.Builder(context) .components { if (Build.VERSION.SDK_INT >= 28) { add(ImageDecoderDecoder.Factory()) } else { add(GifDecoder.Factory()) } } .build() AsyncImage( model = "https://cdn.betterttv.net/emote/566ca38765dbbdab32ec0560/1x", contentDescription = "contentDescription", imageLoader = imageLoader, modifier = Modifier .size(60.dp) .padding(5.dp) .clickable { // handle click } ) }
- The URL does not have to have .gif in it
Proposed change
Why is this important
Additional context
here is the code that will allow the gif animation support: