[TIMOB-10018] Android:Tableview:Child window contains tableview.App crashes on second visit to child window from parent window.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-07-18T20:51:02.000+0000 |
Affected Version/s | Release 2.1.1 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Shyam Bhadauria |
Assignee | Neeraj Gupta |
Created | 2012-07-18T05:12:07.000+0000 |
Updated | 2017-03-10T19:10:25.000+0000 |
Description
This is not a regression. It occurs in 2.1.0 and 2.0.2 as well.
From parent window, going to child window for the second time crashes the app.
Steps to reproduce:
1) Use the code below to make a sample app.
var winMain = Ti.UI.createWindow({
backgroundColor : 'white',
fullscreen : true,
});
var SecWin= Ti.UI.createWindow({
backgroundColor : 'red',
fullscreen : true,
});
var ClickMe = Ti.UI.createButton({
title : 'Click',
backgroundColor:'orange',
width : 60,
height : 40
});
ClickMe.addEventListener('click',function() {
SecWin.backgroundColor = 'white';
var tableView = Ti.UI.createTableView();
var data = [];
for (var c=0;c<4;c++)
{
var label = Ti.UI.createLabel({
text:'Header ' + (c+1),
color:'black',
width:'auto',
height: 'auto',
left:4
});
var pinkHeader = Ti.UI.createView({backgroundColor: 'pink', height: 40});
pinkHeader.add(label);
data[c] = Ti.UI.createTableViewSection({
headerView: pinkHeader
});
for (var x=0;x<10;x++)
{
data[c].add(Ti.UI.createTableViewRow({title:'Group '+(c+1)+', Row '+(x+1)}));
}
}
tableView.data = data;
SecWin.add(tableView);
SecWin.open();
});
winMain.add(ClickMe);
winMain.open();
2) Run the app.
3) Click the button'Click'
4) Press android 'back' button.
5) Click the button'Click'
Expected result:
2) After step 2, a white window with a 'click' button should get displayed.
3) The child window with pink header rows should get displayed.
4) Earlier white parent window should get displayed.
5) The child window should get displayed again.
Actual result:
2) After step 2, a white window with a 'click' button gets displayed.
3) The child window with pink header rows gets displayed.
4) Earlier white parent window gets displayed.
5) App is forced closed.
Duplicate of TIMOB-10017 (pretty sad that TIMOB-10017 and TIMOB-10018 both were filed by the same filer).
Closing ticket as duplicate.