Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15473] iOS: TableView in TabGroup flickers when loading tab for the first time

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2013-10-28T17:06:00.000+0000
Affected Version/sRelease 3.1.1, Release 3.1.2, Release 3.1.3
Fix Version/sn/a
ComponentsiOS
LabelssupportTeam, triage
ReporterRupesh Sharma
AssigneeIngo Muschenetz
Created2013-10-14T11:20:24.000+0000
Updated2017-03-20T22:12:38.000+0000

Description

Description

When each tab is touched for the FIRST time (only) the screen "blacks out" and then after that (say 1/2 a second later), renders the window. successive taps back to that tab are fine and the window appears instantly in each tab. Note : Issue is reproducible with alloy also.

Test Case


Titanium.UI.setBackgroundColor('#000');

var tabGroup = Titanium.UI.createTabGroup();


var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});

var sectionFruit = Ti.UI.createTableViewSection({ headerTitle: 'Fruit' });
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' , backgroundImage:"backgroundNews.png"}));
sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' , backgroundImage:"backgroundNews.png"}));

var sectionVeg = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables' });
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' , backgroundImage:"backgroundNews.png"}));
sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' , backgroundImage:"backgroundNews.png"}));

var sectionFish = Ti.UI.createTableViewSection({ headerTitle: 'Fish' });
sectionFish.add(Ti.UI.createTableViewRow({ title: 'Cod' , backgroundImage:"backgroundNews.png"}));
sectionFish.add(Ti.UI.createTableViewRow({ title: 'Haddock' , backgroundImage:"backgroundNews.png"}));

var table = Ti.UI.createTableView({
  data: [sectionFruit, sectionVeg, sectionFish]
});

win1.add(table);

var win2 = Titanium.UI.createWindow({  
    title:'Tab 2',
    backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Tab 2',
    window:win2
});

var sectionFruit2 = Ti.UI.createTableViewSection({ headerTitle: 'Fruit' });
sectionFruit2.add(Ti.UI.createTableViewRow({ title: 'Apples' , backgroundImage:"backgroundNews.png"}));
sectionFruit2.add(Ti.UI.createTableViewRow({ title: 'Bananas' , backgroundImage:"backgroundNews.png"}));

var sectionVeg2 = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables' });
sectionVeg2.add(Ti.UI.createTableViewRow({ title: 'Carrots' , backgroundImage:"backgroundNews.png"}));
sectionVeg2.add(Ti.UI.createTableViewRow({ title: 'Potatoes' , backgroundImage:"backgroundNews.png"}));

var sectionFish2 = Ti.UI.createTableViewSection({ headerTitle: 'Fish' });
sectionFish2.add(Ti.UI.createTableViewRow({ title: 'Cod' , backgroundImage:"backgroundNews.png"}));
sectionFish2.add(Ti.UI.createTableViewRow({ title: 'Haddock' , backgroundImage:"backgroundNews.png"}));

var table = Ti.UI.createTableView({
  data: [sectionFruit2, sectionVeg2, sectionFish2]
});

win2.add(table);

var win3 = Titanium.UI.createWindow({  
    title:'Tab 3',
    backgroundColor:'#fff'
});
var tab3 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Tab 3',
    window:win3
});

var sectionFruit3 = Ti.UI.createTableViewSection({ headerTitle: 'Fruit' });
sectionFruit3.add(Ti.UI.createTableViewRow({ title: 'Apples' , backgroundImage:"backgroundNews.png"}));
sectionFruit3.add(Ti.UI.createTableViewRow({ title: 'Bananas' , backgroundImage:"backgroundNews.png"}));

var sectionVeg3 = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables' });
sectionVeg3.add(Ti.UI.createTableViewRow({ title: 'Carrots' , backgroundImage:"backgroundNews.png"}));
sectionVeg3.add(Ti.UI.createTableViewRow({ title: 'Potatoes' , backgroundImage:"backgroundNews.png"}));

var sectionFish3 = Ti.UI.createTableViewSection({ headerTitle: 'Fish' });
sectionFish3.add(Ti.UI.createTableViewRow({ title: 'Cod' , backgroundImage:"backgroundNews.png"}));
sectionFish3.add(Ti.UI.createTableViewRow({ title: 'Haddock' , backgroundImage:"backgroundNews.png"}));

var table = Ti.UI.createTableView({
  data: [sectionFruit3, sectionVeg3, sectionFish3]
});

win3.add(table);

tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  
tabGroup.addTab(tab3);


tabGroup.open();

Attachments

FileDateSize
tabview_flicker_ios7.mp42013-10-15T10:49:25.000+0000504449

Comments

  1. Angus Johnston 2013-10-23

    hi, am i correct in understanding that this fix will be rolled out in V3.2.0 ? txs angus
  2. Vishal Duggal 2013-10-24

    Same issue with different test case
  3. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source