Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15771] iOS : Label verticalAlign doesn't work property if minimumFontSize set

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.3
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam, reprod
ReporterJong Eun Lee
AssigneeUnknown
Created2013-11-20T07:39:16.000+0000
Updated2018-02-28T20:03:43.000+0000

Description

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???

Comments

  1. Lee Morris 2017-06-13

    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

JSON Source