小编Soh*_*hah的帖子

仅在图像顶部有圆角 AysncImage Coil

我正在使用新的 AysncImage 加载器在 Box 内进行撰写。盒子本身有一个 RoundedCornerShape。我还为 AsyncImage 添加了一个 RoundedCornerShape ,其值如下

Box(
            modifier = modifier

                .clip(RoundedCornerShape(16.dp))
        ) {
            AsyncImage(
                modifier = Modifier
                    .height(146.dp)
                    .clip(shape = RoundedCornerShape(
                        topStart = 16.dp,
                        topEnd = 16.dp,
                        bottomStart = 0.dp,
                        bottomEnd = 0.dp))
                ,
                model = R.drawable.image,
                contentDescription = null,
                contentScale = ContentScale.Crop,
            )
        }
Run Code Online (Sandbox Code Playgroud)

但图像的各个角落都是圆角的。屏幕截图在这里

我不希望图像底部有圆角。

android android-jetpack android-jetpack-compose coil

7
推荐指数
1
解决办法
7095
查看次数