Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1791] Text Area Percentage Width not respected (initially) - emulator

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-07-25T17:40:46.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsios, ipad, textarea, width
ReporterRavenLife
AssigneeNeeraj Gupta
Created2011-04-15T03:02:30.000+0000
Updated2012-07-26T22:18:05.000+0000

Description

Hi guys,

when setting percentage widths on text areas the correct percentage is not initially correct

if you then change orientation it respects the correct widths, switching back orientation to portrait results in the correct width being used.

var row = Ti.UI.createTableViewRow({height:600});

var textarea = Titanium.UI.createTextArea({

    color:'#000',
    left:15,
    width:'90%',
    font:{fontSize:16},
});

row.add(textarea);
data.push(row);

var tableView = Ti.UI.createTableView({

    data:data,
    style: Titanium.UI.iPhone.TableViewStyle.GROUPED
});

Comments

  1. Stephen Tramer 2012-07-25

    Cannot reproduce with SDK 2.2.0.014b86f in iPhone Sim 5.1. Test code:
       var win = Ti.UI.createWindow();
       var row = Ti.UI.createTableViewRow({height:600, backgroundColor:'red'});
       var data = [];
       
       var textarea = Titanium.UI.createTextArea({
           color:'#000',
           left:15,
           width:'50%',
           font:{fontSize:16},
       });
       row.add(textarea);
       data.push(row);
       
       var tableView = Ti.UI.createTableView({
           data:data,
           style: Titanium.UI.iPhone.TableViewStyle.GROUPED
       });
       win.add(tableView);
       win.open();
       

JSON Source