>我正在尝试在合金应用器(以前是钛)中制作圆形图像视图,如下所示
.XML
<ImageView id="profile_photo" />
TSS
"#profile_photo_view_holder":{
width: 80,
height: 80,
borderRadius: 40,
borderWidth:2,
borderColor:"black"
}
图像视图渲染正常,但其边缘锯齿看起来像是抗锯齿问题。
我也使用映像工厂模块来缩小,但没有运气。
resizedImage = ImageFactory.imageAsResized(blob, {
width : 80,
height : 80,
quality : 0.9
});
$.profile_photo.image = resizedImage;
在Android上,您需要使用模块来实现它。这个模块很新,看起来很棒:
https://github.com/m1ga/com.miga.roundview
我在我的项目中使用这个:https://github.com/snowciety/sc.roundedavatar
希望对你有帮助