Problem Description
Step to reproduce
1. Create a new mobile project
2. Add support for android
3. Paste the code into app.js
4. Run and click a buttons (top, center, bottom)
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var label = Ti.UI.createLabel({
text : 'too long text, too long text',
top : 150,
width : 300,
height : 100,
font : {
fontSize: 10
},
borderColor : 'red',
textAlign : 'right',
verticalAlign : Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP
});
var label2 = Ti.UI.createLabel({
text : 'too long text, too long text, too long text, too long text',
top : 300,
width : 300,
height : 100,
font : {
fontSize: 100
},
minimumFontSize : 10,
borderColor : 'red',
textAlign : 'right',
verticalAlign : Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP,
color : 'red'
});
var bb = Titanium.UI.createButtonBar({
labels:['TOP', 'CENTER', 'BOTTOM'],
backgroundColor:'#336699',
top:50,
style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
height:25,
width:200
});
bb.addEventListener('click',function(e){
label.verticalAlign=Ti.UI["TEXT_VERTICAL_ALIGNMENT_"+bb.labels[e.index]];
label2.verticalAlign=Ti.UI["TEXT_VERTICAL_ALIGNMENT_"+bb.labels[e.index]];
});
win.add(label);
win.add(label2);
win.add(bb);
win.open();
Expected Behavior:
Text alignment work properly. When click button, text move(top, center, bottom)
Actual Behavior:
top : red text(with minimumFontSize) located on bottom
center : red text(with minimumFontSize) located on out of border
bottom : red text disapear???
I am able to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170609091155 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131