[TIMOB-1721] Android: Views inside tableviewrow forget their visibility state when scrolled back in to view
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-06-20T10:15:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.0.0 |
Components | Android |
Labels | android, defect, qe-testadded, rplist, tableview |
Reporter | Bill Dawson |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:00:28.000+0000 |
Updated | 2013-06-20T10:15:06.000+0000 |
Description
Simple failcase below. (Make sure you have KS_nav_ui.png in your Resources folder - it's there by default.) Click on the image in a row and the image will disappear. Scroll so the whole row is not visible, then scroll back -- the image will be visible again.
var win = Ti.UI.currentWindow;
var rows = [];
for (var i = 0 ; i < 20; i++) {
var btn = Ti.UI.createButton({ backgroundImage: 'KS_nav_ui.png', left: 5});
btn.addEventListener('click', function(e) {e.source.hide()});
var row = Ti.UI.createTableViewRow();
row.add(btn);
row.add(Ti.UI.createLabel({text: 'Row ' + i, left: 50}));
rows.push(row);
}
win.add(Ti.UI.createTableView({data: rows}));
I put the wrong code in before. Fixed it.
If more tests are need see offer in http://developer.appcelerator.com/helpdesk/view/51341">HelpDesk 51341
Another Ticket Reference: http://developer.appcelerator.com/helpdesk/view/75521">http://developer.appcelerator.com/helpdesk/view/75521
Also, objects that are animated into place also lose their state and move back after scroll.
This app.js does not work (visibility and location reset after scroll): http://developer.appcelerator.com/s3/retrieve/attachments.helpdesk.appcelerator.com/75521/comment/362287/app.js"> http://developer.appcelerator.com/s3/retrieve/attachments.helpdesk....
This one does by setting visibility instead of using hide and eliminating animate: http://developer.appcelerator.com/s3/retrieve/attachments.helpdesk.appcelerator.com/75521/comment/362303/app.js"> http://developer.appcelerator.com/s3/retrieve/attachments.helpdesk....
Tested with 1.6 and APIs 2.2
Tested using TiSDK 2.2.0v20120816015712 on a Samsung Galaxy S2, unable to reproduce the issue. Used the following code:
Ticket closed.
Verified fixed with : Mobilesdk-2.2.0.v20120816212512 Titanium Studio, build: 2.1.1.201207271312 Devices: Galaxy S III Android version 4.0.4
Reopening to update labels
Tested with: SDK:3.1.2.v20130619101604 Appcelerator Studio: 3.1.1.201306131423 OS: OSX 10.7.5 Device:iPad mini(v 6.0), htc desire(v 4.0.3) Xcode: 4.6