var win = Ti.UI.createWindow({
backgroundColor: 'black',
});
var vw_main = Ti.UI.createView({
left: 0,
top: 0,
width: '100%',
height: '100%',
layout: 'vertical',
});
win.add(vw_main);
var vw_rect1 = Ti.UI.createView({
top: 20,
width: 200,
height: 300,
borderRadius: 20,
backgroundColor: 'red',
});
vw_main.add(vw_rect1);
var checkBox = Ti.UI.createSwitch({
top: 10,
value: true,
style: Titanium.UI.Android.SWITCH_STYLE_CHECKBOX,
title: 'Border Radius is enabled',
});
vw_main.add(checkBox);
checkBox.addEventListener('change', function (e) {
if (e.value) {
vw_rect1.borderRadius = 20;
checkBox.title = "Border Radius is enabled";
}
else {
vw_rect1.borderRadius = 0;
//vw_rect1.borderRadius = 0.1; //Current Workaround
checkBox.title = "Border Radius is not enabled";
}
});
win.open();
Currently as a workaround I am setting the borderRadius to 0.1 instead of 0.
Hello, Thanks for reaching out to us. It would be great if you can describe more about the issue you are experiencing and share complete console logs/screenshot which displays the issue.
If I set the borderRadius of a view to 10 and then later set the borderRadius of the same view to 0, the borderRadius doesn’t change to 0 and remains at 10. I have shared the code in the description and tested it on SDK 8.0.2.GA in a classic app on an android device. I could share a screenshot but it would basically be a view with a borderRadius of 10. I don’t think that will help out. Also there is nothing in the logs This is a bug I’ve seen on 8.0.2.GA and not the previous SDK. Also currently as a workaround I am setting the borderRadius to 0.1 instead of 0. That seems to get it working.
[~pritish.george], Thanks for letting us know. Hope this issue is sorted out. Can we close this now?
The bug still exists and not sure about the stability of the workaround
Hello, I can verify the issue in the latest SDK 8.1.0.GA and 8.1.1.GA. in android. The borderRadius doesn’t change to 0 and remains at 10 upon change. But it does come to 0.1 if that was used instead of 0. Moving to engineering. Thanks.
Fixed by TIMOB-27946