Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5498] Last row of tableView half-hidden when in window with vertical layout

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-06-06T15:36:28.000+0000
Affected Version/sRelease 1.7.2, Release 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-12 Core
ComponentsAndroid
LabelsSupportTeam, core, qe-testadded
ReporterShawn Lipscomb
AssigneeAllen Yeung
Created2011-09-23T05:51:46.000+0000
Updated2012-07-16T03:47:58.000+0000

Description

Using the code below, the last row of a TableView is only half visible when the window has layout "vertical". The last row gets cut off by the height of the Label. It appears that when the TableView determined its own height, it didn't take into consideration its effective top. Setting the TableView's bottom to 0 produces the same result. Don suggested trying wrapping the two controls in a view and having the view be vertical layout...same result. Removing layout:'vertical' (and setting an explicit top to the TableView) does resolve the problem, but this is not practical solution since many apps need to use the vertical layout due to unknown or dynamic dimensions of the topmost controls. According to Don, "TableView wants to be fullscreen so it definitely sounds like a layout problem."
var win = Ti.UI.createWindow({
  backgroundColor:'#fff',
  url:'win1.js',
  layout:'vertical',
  exitOnClose:true,
  navBarHidden:false
}).open();
var win1=Ti.UI.currentWindow;

var TopLabel=Ti.UI.createLabel({
  text:'Hello World',
  color:'black',
  left:0,
  right:0,
  height:25,
  backgroundColor:'yellow'
});

win1.add(TopLabel);

var MyListbox=Ti.UI.createTableView({
  backgroundColor:'black',
//  bottom:0, // this results in the same problem
});

for (var i=0; i<30; i++){
  MyListbox.appendRow(Ti.UI.createTableViewRow({
    title:'Row '+i
  }));
}

win1.add(MyListbox);

Comments

  1. Shawn Lipscomb 2011-09-27

    Relevant Q&A topic with Don Thorp's comments is here: [http://developer.appcelerator.com/question/125771/tableview-last-row-never-completely-exposed-when-a-top-label-exists-windowlayoutvertical]
  2. Paul Dowsett 2011-10-12

    Shawn Please try to use the markup provided, so that your ticket is easier to understand. For future reference, see the formatting changes I've made. I can confirm that I've reproduced the problem using your code, and hence am moving to the main project for the core team's consideration. Thanks for raising this ticket. Cheers
  3. Wilson Luu 2012-03-12

    Closing bug. Verified fix on: SDK build: 2.0.0.v20120312091733 Runtime: V8, Rhino Titanium Studio, build: 1.0.9.201202141208 Device: Nexus One (2.2.2) OS: Mac OS X Lion (10.7.2)
  4. Shawn Lipscomb 2012-03-19

    Verified fix on SDK 2.0.0.v20120319003254. Thanks!
  5. Shawn Lipscomb 2012-03-23

    Woops...spoke too soon. Bug still exists when navBarHidden is set to true in app.js.
  6. Junaid Younus 2012-03-23

    This bug still exists if you set the navBarHidden property to true. Tested with the latest CI build 2.0.0.v20120323111758, using a HTC Sensation 4G running 2.3.x.
  7. Shawn Lipscomb 2012-04-03

    HD ticket: http://support.appcelerator.com/tickets/APP-993421
  8. Shawn Lipscomb 2012-04-17

    Still a problem in SDK 2.1.0.v20120416160358 (with navBarHidden:true).
  9. Shawn Lipscomb 2012-05-21

  10. Junaid Younus 2012-05-23

    Tested with 2.0.1GA2 on a Samsung Galaxy S2, issue still exists when you set navBarHidden to true.
  11. Allen Yeung 2012-06-06

    Tested this on galaxy s2 on 2.0.2GA and it works fine. Please try with 2.0.2.GA and reopen if this is still occuring.
  12. Shawn Lipscomb 2012-06-07

    Verified fix on SDK 2.1.0.v20120520110234 with navBarHidden:true. Thanks!
  13. Anshu Mittal 2012-07-16

    Verified with SDK:2.1.1.v20120712160111 Verified with Studio:2.1.1.201207121732 Every row of table view is fully visible when in window with vertical layout.

JSON Source