{ "id": "61612", "key": "TIMOB-980", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11224", "name": "Release 1.4.0", "archived": true, "released": true, "releaseDate": "2010-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:51.000+0000", "created": "2011-04-15T02:40:41.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:51.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}
see code - run app, click button - alignment is jacked
\n//Sample code to illustrate the new table alignment problem\nintroduced in MobileSDK 1.3.0
\n// this sets the background color of the master UIView (when\nthere are no windows/tab groups on it)\nTitanium.UI.setBackgroundColor('#000');
\n// create tab group var tabGroup =\nTitanium.UI.createTabGroup();
\n// // create base UI tab and root window // var win1 =\nTitanium.UI.createWindow({
\ntitle:'Tab 1',\nbackgroundColor:'#fff'
\n
\n}); var tab1 = Titanium.UI.createTab({
\nicon:'KS_nav_views.png',\ntitle:'Tab 1',\nwindow:win1
\n
\n});
\nvar label1 = Titanium.UI.createLabel({
\ncolor:'#999',\ntext:'I am Window 1',\nfont:{fontSize:20,fontFamily:'Helvetica Neue'},\ntextAlign:'center',\nwidth:'auto'
\n
\n});
\nwin1.add(label1);
\n//button test var myButton = Titanium.UI.createButton({
\ntitle:'Change Row Data',\ntop:0,\nheight:30
\n
\n}); win1.add(myButton);
\nmyButton.addEventListener('click', function(e) {
\nTi.API.debug('myButton click:');\nif (e.source.title == 'My Button') {\n Ti.API.debug(' clicked my button');\n} else {\n Ti.API.debug(' not interested');\n}
\n
\n});
\n//table test var data = [];
\nvar section = Ti.UI.createTableViewSection();
\ndata.push(section);
\n//row1 var row1col1 = Ti.UI.createLabel({
\ntext: 'ROW1',\ntextAlign: 'Left',\nheight: 'auto',\nwidth: 'auto',\ncolor: '#000',\nleft:10,\nborderWidth:1,\nborderColor:'red'
\n
\n}); var row1col2 = Ti.UI.createLabel({
\ntext: 'FOO',\ntextAlign: 'Left',\nheight: 'auto',\nwidth: 'auto',\ncolor: '#000',\nleft:100,\nborderWidth:1,\nborderColor:'red'
\n
\n}); var row1 = Ti.UI.createTableViewRow({
\nhasChild: true,\nbackgroundColor: '#fff'
\n
\n}); row1.add(row1col1);
\nrow1.add(row1col2);
\n//row2 var row2col1 = Ti.UI.createLabel({
\ntext: 'ROW2',\ntextAlign: 'left',\nheight: 'auto',\nwidth: 'auto',\ncolor: '#000',\nleft:10,\nborderWidth:1,\nborderColor:'red'
\n
\n}); var row2col2 = Ti.UI.createLabel({
\ntext: 'BAR',\ntextAlign: 'left',\nheight: 'auto',\nwidth: 'auto',\ncolor: '#000',\nleft:100,\nborderWidth:1,\nborderColor:'red'
\n
\n}); var row2 = Ti.UI.createTableViewRow({
\nhasChild: true,\nbackgroundColor: '#fff'
\n
\n}); row2.add(row2col1);
\nrow2.add(row2col2);
\n//add rows to section section.add(row1);
\nsection.add(row2);
\n//tableview var tableview = Ti.UI.createTableView({
\ndata:data,\nstyle:Ti.UI.iPhone.TableViewStyle.GROUPED,\ntop:35
\n
\n}); win1.add(tableview);
\n//add a listener for the button so that we demonstrate the table\nalignments getting messed up myButton.addEventListener('click',\nfunction(e) {
\nrow1col1.text = 0;\nrow2col1.text = 0;
\n
\n});
\n// // create controls tab and root window // var win2 =\nTitanium.UI.createWindow({
\ntitle:'Tab 2',\nbackgroundColor:'#fff'
\n
\n}); var tab2 = Titanium.UI.createTab({
\nicon:'KS_nav_ui.png',\ntitle:'Tab 2',\nwindow:win2
\n
\n});
\nvar label2 = Titanium.UI.createLabel({
\ncolor:'#999',\ntext:'I am Window 2',\nfont:{fontSize:20,fontFamily:'Helvetica Neue'},\ntextAlign:'center',\nwidth:'auto'
\n
\n});
\nwin2.add(label2);
\n// // add tabs // tabGroup.addTab(tab1);
\ntabGroup.addTab(tab2);
// open tab group tabGroup.open();
Two people are now reporting this
(from [905edbe24bd27b5ef2cb63e5975f9e965c7f04dc])\nCloses #980 , Closes #990 - our\ncontainer view should be filling the content view bounds (which has\na 0 origin), not the frame, which may not have a 0 origin (IE, when\nin a grouped view). \nhttp://github.com/appcelerator/titanium_mobile/commit/905edbe24bd27...