xfy feb7db718e feat: 引入 sketch4 显示 GIF 动画,新增 AnimatedGif 组件
- 添加 sketch4 依赖(compose / animated-gif / compose-resources)
- 升级 tyme4kt 1.4.4 → 1.4.5
- 新增 puppy_1.gif 资源与 AnimatedGif 通用组件

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 13:36:14 +08:00

26 lines
630 B
Kotlin

package plus.rua.project.ui
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.github.panpf.sketch.AsyncImage
/**
* 显示动画 GIF 图片。
*
* @param modifier 应用于图片的 Modifier
* @param contentDescription 无障碍描述
*/
@Composable
fun AnimatedGif(
modifier: Modifier = Modifier,
contentDescription: String? = null,
) {
AsyncImage(
uri = "compose.resource://files/puppy_1.gif",
contentDescription = contentDescription,
modifier = modifier,
)
}