Android Jetpack Compose中SVG转XML后边缘像素化/锯齿问题求助
Android Compose Logo 显示锯齿/像素化问题排查
操作背景
在Android Studio中将SVG格式的Logo转换为XML格式,由于Android不支持#pattern语法,将原SVG中的Fill="#pattern"替换为FillColor,个人判断该操作并非问题诱因,但需告知此修改。
异常现象
Logo在不同设备/模拟器上显示效果不一致:
- 6.5英寸真机:画质显示正常
- 5.7英寸真机:出现明显锯齿边缘
- 6.7英寸模拟器:存在像素化模糊问题
相关Compose代码
Image( imageVector = ImageVector.vectorResource(id = R.drawable.logo_white), contentDescription = "logo_white", contentScale = ContentScale.Fit, modifier = Modifier .offset(y = 90.dp) .sharedElement( state = rememberSharedContentState(key = "logo_white"), animatedVisibilityScope = animatedVisibilityScope, boundsTransform = { _, _ -> tween(durationMillis = 1000) } ) )
恳请帮忙排查此问题。
内容的提问来源于stack exchange,提问作者StonedCodingTom
相关产品推荐
相关产品推荐

