Closed vickyleu closed 1 year ago
是否开启了 resizeApplyToDrawable(),目前这个功能有些 bug
现在最新的 3.2.1-beta03 版本在 ImageVie 上应该可以无障碍的播放 AnimatedVectorDrawable 了,
但在 compose 上,已知 api29 以上依然无法播放,测试代码如下:
val context = LocalContext.current
val painter = remember {
val drawable = ContextCompat.getDrawable(context, R.drawable.animated_placeholder) as AnimatedVectorDrawable
DrawablePainter(drawable!!)
}
Image(
painter = painter,
contentDescription = "",
contentScale = ContentScale.Crop,
modifier = Modifier.fillMaxSize()
)
这段代码没有涉及到 sketch,所以这个 bug 只能等 compose 团队去解决
DisplayRequest builder like this
adding a state listener