Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8982] iOS: Ti.UI.SIZE on the view, does not work on its child labels, that need to wrap text

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2012-05-22T16:14:31.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-11 API
ComponentsiOS
Labelsapi
ReporterDevang Gandhi
AssigneeVishal Duggal
Created2012-05-03T17:07:20.000+0000
Updated2017-03-22T20:36:21.000+0000

Description

In the example, we have two adjacent labels and a view in window and we want the view that contains the two labels to size its height to the largest label. The first label contains text that should wrap onto multiple lines. Instead of doing that it ellipsizes the text. This behavior was possible in 1.8 versions of the SDK.
var win = Ti.UI.createWindow({
        fullscreen : false,
        backgroundColor : 'white'
});
 
var containerView1 = Ti.UI.createView({
        top : '0dp',
        left : '0dp',
        backgroundColor : 'green',
        height : Ti.UI.SIZE,
        width : Ti.UI.SIZE
});
 
var label1 = Ti.UI.createLabel({
        text : 'BLAH BLAH BLAH BLAH BLAH!',
        top : '0dp',
        left : '0dp',
        textAlign : 'right',
      	width : '100dp',
        
});
 
 
var label2 = Ti.UI.createLabel({
        text : 'BLAH BLAH!',
        top : '0dp',
        left : '108dp',

});
 
 
containerView1.add(label1);
containerView1.add(label2);
 
win.add(containerView1);
 
win.open();

Attachments

FileDateSize
Screen Shot 2012-05-03 at 10.25.34 AM.png2012-05-03T17:07:20.000+000092638

Comments

  1. Vishal Duggal 2012-05-22

    Duplicate of TIMOB-8713
  2. Sabil Rahim 2012-06-01

    Fix Back ported to 2_0_X by [PR2305](https://github.com/appcelerator/titanium_mobile/pull/2305) and the fix should be available on 2_0_X branch from commit [a43004b8e](https://github.com/appcelerator/titanium_mobile/commit/a43004b8eb830edfb22f8ef21f3d37ac1e6ab9f0)
  3. Lee Morris 2017-03-22

    Closing ticket as duplicate of the ticket that is mentioned above.

JSON Source