[TIMOB-1787] Android: Tableviews disappear in ScrollableView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:57:10.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M01 |
Components | Android |
Labels | android, defect, release-1.6.0 |
Reporter | Bill Dawson |
Assignee | Don Thorp |
Created | 2011-04-15T03:02:23.000+0000 |
Updated | 2011-04-17T01:57:10.000+0000 |
Description
If you scroll away (i.e., scroll to the right) from a screen in the ScrollableView that contains a TableView, then scroll back, the TableView has disappeared.
Easy failcase app.js:
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title:'Test', backgroundColor:'#fff', fullscreen: true
});
var views = [];
for (var i = 0; i < 5; i++) {
views.push(
Ti.UI.createTableView({
data: [ Ti.UI.createTableViewRow({title: 'Row for view ' + i}) ]
})
);
}
win.add(Ti.UI.createScrollableView({ views: views }));
win.open();
assigned to don for milestone/priority. Refers to http://developer.appcelerator.com/helpdesk/view/42051">this helpdesk item.
This is a manifestation of trying to support infinitely scrollable views http://github.com/appcelerator/titanium_mobile/commit/ed329f7e570778c5e99fc15e5a320738d322ba0d"> commit at http://github.com/appcelerator/titanium_mobile/commit/ed329f7e570778c5e99fc15e5a320738d322ba0d#L0R80"> Line 80 releaseViews is getting called. In the case of TableView they don't seem to be getting restored.
That seems to stem from crossing the streams between proxies and views http://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/org/appcelerator/titanium/proxy/TiViewProxy.java#L440"> Starting at line 440 in http://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/org/appcelerator/titanium/proxy/TiViewProxy.java"> commit
When being detaching proxies from views in ScrollableView, it should not destroy the TableView proxy hierarchy. Otherwise, there is no way to rebuild the TableView.
Note: this is likely a side-effect of cleanup: when going to next view, we're destroying the views and then they don't get rebuilt when going back.
(from [7a8a2333afb959f698e856e0c6f2d484b6b166c4]) [#1787] drillbit test for tableview disappearing in scrollableview bug https://github.com/appcelerator/titanium_mobile/commit/7a8a2333afb959f698e856e0c6f2d484b6b166c4"> https://github.com/appcelerator/titanium_mobile/commit/7a8a2333afb9...
(from [b2c8930d64cc5a9c00c916895432fe529d74fb7e]) [#1787 state:fixed-in-qa] Don't clear proxies of tableview constituents (rows, stuff inside rows, etc.), else can't be reconstructed when tableview is re-shown https://github.com/appcelerator/titanium_mobile/commit/b2c8930d64cc5a9c00c916895432fe529d74fb7e"> https://github.com/appcelerator/titanium_mobile/commit/b2c8930d64cc...
G1 (1.6) droid 1 (2.2.1), confirmed correct behavior on a 4gt ipod touch. Titanium SDK version: 1.6.0 (01/06/11 08:47 8b2fd0e) opening a new bug for a cosmetic issue with scrolling that only affects 1.6