[AC-1949] borderRadius on Android Views is not shown correct
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2013-07-03T17:56:31.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | Android, borderRadius |
| Reporter | Thomas Neerup |
| Assignee | Mauro Parra-Miranda |
| Created | 2013-07-01T06:42:01.000+0000 |
| Updated | 2016-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
| File | Date | Size |
|---|---|---|
| android.png | 2013-07-01T06:42:01.000+0000 | 3533 |
| borderradius-android412.png | 2013-07-03T17:52:48.000+0000 | 13848 |
| ios.png | 2013-07-01T06:42:01.000+0000 | 3523 |
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.