[英]Icon too blurry in Jetpack Compose
When I'm trying to display icon with scale I get blurry image.当我尝试显示带有比例的图标时,我会得到模糊的图像。 Can't find reason for this because XML icons are scalable and don't have resolution.找不到原因,因为 XML 图标是可缩放的并且没有分辨率。 Do you know how to resolve?你知道怎么解决吗?
My code:我的代码:
Image(
painter = painterResource(id = R.drawable.ic_outline_bluetooth_24),
contentDescription = "",
contentScale = ContentScale.Crop,
alpha = 0.1f,
modifier = Modifier.scale(6f).padding(end = 10.dp)
)
It is because you are scal
ing the icon.这是因为您正在scal
图标。 Try Modifier.width(...)
and Modifier.height(...)
instead.试试Modifier.width(...)
和Modifier.height(...)
。
It is being stretched.它正在被拉伸。 Also, please consider attaching the screenshots if the problem pertains to images or media.此外,如果问题与图像或媒体有关,请考虑附上屏幕截图。
Thanks,谢谢,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.