Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9127] iOS: label height of Ti.UI.SIZE doesn't grow to the height of the content

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2012-05-22T09:54:50.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-11 Core
ComponentsiOS
LabelsSupportTeam, core, parity
ReporterEduardo Gomez
AssigneeMax Stepanov
Created2012-05-14T13:01:55.000+0000
Updated2017-03-22T22:07:11.000+0000

Description

Issue

As the title

Tested on

iOS 5 simulator Droid razr 2.3.5

Expected behavior - 2.1.0 SDK

A label with a height of Ti.UI.SIZE and fixed width specified will grow to the size of the content.

Current Behavior - 2.0.1.x

A label with a height of Ti.UI.SIZE and fixed width specified doesn't grow to the height of the content.

Repro sequence

Titanium.UI.setBackgroundColor('#000');

var win1 = Titanium.UI.createWindow({  
    title:'My Window',
    backgroundColor:'pink'
});

var view = Ti.UI.createView(
{
    top: 20,
    left: 10,
    right: 10,
    height: Ti.UI.SIZE,
    backgroundColor: "white",
    borderSize: 1,
    borderRadius: 6
});
win1.add(view);

var label1 = Ti.UI.createLabel(
{
    left: 10,
    right: 10,
    top: 10,
    height: Ti.UI.SIZE,
    text: "Address",
    color: "black"
});
view.add(label1);

var label2 = Ti.UI.createLabel(
{
    right: 10,
    width: 150,
    top: 28,
    bottom: 10,
    height: Ti.UI.SIZE,
    color: "black",
    text: "3422 North 2322 West, Amazing City AK 93222, United States of America, The Sol System, The Milky Way"
});
view.add(label2);

win1.open();

Attachments

FileDateSize
2.0.1.jpg2012-05-14T13:01:55.000+000048072
2.1.0.jpg2012-05-14T13:01:55.000+000054510

Comments

  1. Max Stepanov 2012-05-21

    This was fixed by TIMOB-8713 and already on master (2.1.0) release. Reopen if it needs to be back ported to 2.0.2.
  2. Eduardo Gomez 2012-05-21

    Please back port in 2.0.x branch. Thanks.
  3. Stephen Tramer 2012-05-22

    Duplicate of TIMOB-8713, as stated by Max.
  4. Max Stepanov 2012-05-22

    TIMOB-8713 was marked for 2.0.2 back port.
  5. 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)
  6. Lee Morris 2017-03-22

    Closing ticket as duplicate and links to the related ticket have been provided above.

JSON Source