Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11605] Android: TabGroup - Black screen appears on launch

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionHold
Resolution Date2012-11-01T20:19:53.000+0000
Affected Version/sRelease 2.1.4
Fix Version/s2012 Sprint 22 API, 2012 Sprint 22
ComponentsAndroid
Labelsapi, qe-and214, triage
ReporterTamila Smolich
AssigneeHieu Pham
Created2012-10-29T21:59:06.000+0000
Updated2013-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

FileDateSize
device-2012-10-29-145610.png2012-10-29T21:59:06.000+000011903

Comments

  1. Hieu Pham 2012-10-31

    This is a racing condition with the old tab group implementation. Removing the function scope in the test code seems to solve this problem.

JSON Source