[TIMOB-11605] Android: TabGroup - Black screen appears on launch
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Hold |
| Resolution Date | 2012-11-01T20:19:53.000+0000 |
| Affected Version/s | Release 2.1.4 |
| Fix Version/s | 2012 Sprint 22 API, 2012 Sprint 22 |
| Components | Android |
| Labels | api, qe-and214, triage |
| Reporter | Tamila Smolich |
| Assignee | Hieu Pham |
| Created | 2012-10-29T21:59:06.000+0000 |
| Updated | 2013-12-03T21:00:19.000+0000 |
Description
Description:
While testing TabGroup I noticed black screen appears instead of tableView with 500 rows. It happens always on a first run (after installation).
This is not a regression, the behavior exists on 2.1.3 as well.
Does not happen on 2.1.2 and 3.0.0.
Steps:
1. Run the following code:
(function() {
var create = function() {
var tabGroupWrapper = {}, tabWrapper = {}, winWrapper = {}, tableViewWrapper = {}, buttonWrapper = {};
tabGroupWrapper.Element = Ti.UI.createTabGroup();
winWrapper.Element = Ti.UI.createWindow({ navBarHidden: true, backgroundColor: '#fc9', layout: 'vertical' });
tabWrapper.Element = Ti.UI.createTab({ title: 'Test', window: winWrapper.Element });
tabGroupWrapper.Element.addTab(tabWrapper.Element);
tableViewWrapper.Element = Ti.UI.createTableView();
var data = [];
for (var i = 1; i <= 500; ++i) {
data.push({ title: 'Row ' + i});
}
tableViewWrapper.Element.setData(data);
buttonWrapper.Element = Ti.UI.createButton({
title: 'Create new tabgroup!'
});
buttonWrapper.Element.addEventListener('click', function() {
create();
});
winWrapper.Element.add(buttonWrapper.Element);
winWrapper.Element.add(tableViewWrapper.Element);
tabGroupWrapper.Element.setActiveTab(0);
tabGroupWrapper.Element.open();
};
create();
})();
Expected result:
Should see tableView with 500 rows and "Create new tabgroup" button
Actual:
Black screen appears
Attachments
| File | Date | Size |
|---|---|---|
| device-2012-10-29-145610.png | 2012-10-29T21:59:06.000+0000 | 11903 |
This is a racing condition with the old tab group implementation. Removing the function scope in the test code seems to solve this problem.