Reputation: 1
I am trying to make an circular image view in Alloy appcelerator formerly Titanium like this
XML
<ImageView id="profile_photo" />
TSS
"#profile_photo_view_holder":{
width: 80,
height: 80,
borderRadius: 40,
borderWidth:2,
borderColor:"black"
}
The image view is rendering properly but jaggy in its edges looks like an anti aliasing problem.
I use image factory module to scale down also but no luck.
resizedImage = ImageFactory.imageAsResized(blob, {
width : 80,
height : 80,
quality : 0.9
});
$.profile_photo.image = resizedImage;
Upvotes: 0
Views: 292
Reputation: 591
on Android you will need to make use of a module to achieve it. This module is quite new and looks great:
https://github.com/m1ga/com.miga.roundview
I'm using this one in my project: https://github.com/snowciety/sc.roundedavatar
Hope it helps
Upvotes: 2