Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1949] borderRadius on Android Views is not shown correct

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-07-03T17:56:31.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsAndroid, borderRadius
ReporterThomas Neerup
AssigneeMauro Parra-Miranda
Created2013-07-01T06:42:01.000+0000
Updated2016-03-08T07:40:52.000+0000

Description

To make a View Circular, the code on would look like this.
<View borderRadius="10" width="20" height="20" backgroundColor="red"/>
var win = Ti.UI.createWindow({
	backgroundColor : '#FFF'
});

var myView = Ti.UI.createView({
	borderRadius : 10,
	width : 20,
	height : 20,
	backgroundColor : "red"
});
win.add(myView);

win.open();
This works on fine iOS, but on Android the view is drawn as a square with rounded corners. See the attached pictures To make the view Circular on Android, borderRadius can be set to the same as the width/height. But this seems the be a dirty hack.

Attachments

FileDateSize
android.png2013-07-01T06:42:01.000+00003533
borderradius-android412.png2013-07-03T17:52:48.000+000013848
ios.png2013-07-01T06:42:01.000+00003523

Comments

  1. Daniel Sefton 2013-07-03

    I can't reproduce this.. Tested on Samsung Galaxy S2 2.3.6, Android x86 emulator 4.1.2, with anyDensity set to both false and true with Ti SDK 3.1.1 GA. See my attachment for what I see.

JSON Source