[TIMOB-5498] Last row of tableView half-hidden when in window with vertical layout
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-06-06T15:36:28.000+0000 |
Affected Version/s | Release 1.7.2, Release 2.0.1 |
Fix Version/s | Release 2.1.0, Sprint 2012-12 Core |
Components | Android |
Labels | SupportTeam, core, qe-testadded |
Reporter | Shawn Lipscomb |
Assignee | Allen Yeung |
Created | 2011-09-23T05:51:46.000+0000 |
Updated | 2012-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);
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]
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
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)
Verified fix on SDK 2.0.0.v20120319003254. Thanks!
Woops...spoke too soon. Bug still exists when navBarHidden is set to true in app.js.
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.
HD ticket: http://support.appcelerator.com/tickets/APP-993421
Still a problem in SDK 2.1.0.v20120416160358 (with navBarHidden:true).
Tested with 2.0.1GA2 on a Samsung Galaxy S2, issue still exists when you set navBarHidden to true.
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.
Verified fix on SDK 2.1.0.v20120520110234 with navBarHidden:true. Thanks!
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.