Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2795] Android: Label with percent width doesn't show up

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2012-08-01T00:19:23.000+0000
Affected Version/sRelease 1.6.0
Fix Version/sRelease 2.0.1
ComponentsAndroid
Labelsmodule_label, qe-testadded
ReporterDawson Toth
AssigneeNeeraj Gupta
Created2011-04-15T03:29:46.000+0000
Updated2012-08-10T11:23:01.000+0000

Description

Problem

A label with 100% does not show up, but a label with 'auto' width does.

Tested On

Titanium Mobile 1.6.0 pulled January 8th, 2011
BROKEN on Android Simulator 2.2
WORKS on iPhone Simulator 4.2

Sample Code

The following should show two labels. The labels only differ in their widths: auto, and 100%.

var win = Ti.UI.createWindow({ backgroundColor: '#000' });

win.add(Titanium.UI.createLabel({
    text: 'You will see this label with width:auto',
    width: 'auto',
    top: 5
}));

win.add(Titanium.UI.createLabel({
    text: 'But you will not see this label with width:100%',
    width: '100%',
    bottom: 5
}));

win.open();

Associated Helpdesk Ticket

http://developer.appcelerator.com/helpdesk/view/65241">http://developer.appcelerator.com/helpdesk/view/65241

Attachments

FileDateSize
labelwithpercentwidthlog.rtf2011-04-15T03:29:47.000+000026788

Comments

  1. Junaid Younus 2012-05-14

    Tested with 2.0.1GA2 on a Samsung Galaxy S2 (2.3.6) as well as on the Android Emulator (2.2). Seems to work fine. Ticket closed.
  2. Evgenii Tcarev 2012-07-16

    Closing as fixed. Tested with:
 Titanium Studio, build: 2.1.1.201207121732 Titanium SDK: 2.2.0.v20120716114111 
Device: Android Emulator 2.2
  3. Shyam Bhadauria 2012-08-01

    Re-opening to edit label

JSON Source