Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6769] iOS: Set tableViewRow height using percentages

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-01-23T16:57:48.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2011-52, Release 2.0.0, Release 1.8.1
ComponentsiOS
Labelsmodule_tableviewrow, parity, qe-testadded
ReporterMauro Parra-Miranda
AssigneeStephen Tramer
Created2011-12-19T16:02:01.000+0000
Updated2014-06-19T12:43:41.000+0000

Description

PROBLEM DESCRIPTION

Customer wants to Set tableViewRow height using percentages.

STEPS TO REPRODUCE

1. Create a window 2. Create a tableViewRow with height '100%' 3. Create a tableView 4. Add the row to the tableView 5. Add tv to window 6. Open window

ACTUAL RESULTS

A bunch of rows

EXPECTED RESULTS

the row height should be the height of the tableView

CODE


var win=Ti.UI.createWindow();
var tableview=Ti.UI.createTableView();
var tableviewrow=Ti.UI.createTableViewRow({
	height:'100%',
});
tableview.add(tableviewrow);
win.add(tableview);
win.open();

Comments

  1. Stephen Tramer 2011-12-27

    Accurate functional test:
       var win=Ti.UI.createWindow();
       var tableview=Ti.UI.createTableView({
       	backgroundColor:'blue'
       });
       var tableviewrow=Ti.UI.createTableViewRow({
       	height:'100%',
       	backgroundColor:'red'
       });
       tableview.setData([tableviewrow]);
       win.add(tableview);
       win.open();
       
    If the bug is fixed, the table will render so that no blue background is visible. Note that the table still scrolls and the separator is still visible, and to achieve the desired effect the table may need to be locked and row separators turned off. A better alternative to using a table row of 100% is to not display the table until data is loaded.
  2. Michael Pettiford 2012-01-12

    Closing issue Tested with Ti Studio 1.0.8.201201101928 Ti Mob SDK 1.9.0.v20120111233134 OSX Lion iPhone 4S, iPad 2 OS Expected result of the row height being the height of the table view is shown
  3. Ivan Skugor 2012-02-24

  4. Shameer Jan 2013-12-10

    Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4940

JSON Source