我正在尝试在Alloy appcelerator中创建一个圆形图像视图,以前像这样的 XML TSS 图像视图正确渲染,但其边缘锯齿看起来像是一个抗锯齿问题。 我使用图像工厂模块也缩小了但没有运气。<ImageView id="profile_photo" />
"#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;
答案 0 :(得分:2)
在Android上,你需要使用一个模块来实现它。 这个模块很新,看起来很棒:
https://github.com/m1ga/com.miga.roundview
我在我的项目中使用这个: https://github.com/snowciety/sc.roundedavatar
希望有所帮助