problem
When a view in a vertical layout gets a
borderRadius
added to it, it pushes it to the end of the layout, regardless of its current position.
expected
The view should stay in its current position in the layout when it gets a borderRadius added to it.
test case
var win = Ti.UI.createWindow({
backgroundColor: '#fff',
modal: false,
exitOnClose: true,
layout: 'vertical'
});
win.addEventListener('click', function() {
labels[1].applyProperties({
borderRadius: 16
});
});
var labels = [];
for (var i = 0; i < 4; i++) {
labels.push(Ti.UI.createLabel({
text: 'label ' + i,
color: '#000',
backgroundColor: '#'+Math.floor(Math.random()*16777215).toString(16),
height: 40,
width: 250,
// Adding a starting borderRadius avoids the problem. It can be bigger or smaller than
// the target borderRadius, as long as it is assigned a value.
// borderRadius: 4
}));
win.add(labels[i]);
}
win.open();
PR : - https://github.com/appcelerator/titanium_mobile/pull/4645
CR + FR
The view stays in its current position in the layout when it gets a borderRadius added to it. Verified fix on: Device : Google Nexus 7, Android Version: 4.3 SDK: 3.2.0.v20131018154951 CLI version : 3.2.0 OS : MAC OSX 10.8.4 Alloy : 1.2.2 Appcelerator Studio, build: 3.2.0.201310181700 XCode : 5