[TIMOB-4243] tableview row with vertical layout flickering
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2017-08-17T21:38:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | N. Nedev |
Assignee | Ingo Muschenetz |
Created | 2011-05-17T08:57:31.000+0000 |
Updated | 2017-08-17T21:38:06.000+0000 |
Description
Tableview row with vertical layout and few labels added to this row result in row flickering, while window opens. The labels appear as moving a little from bottom to their actual position in the row.
This issue is visible on device (iPhone 3GS firmware 4.1 (8b117)), Ti Mobile 1.7.0 with iOS 4.2.
The test case is written below. The troubled code is in a sub-context window (newWindow.js) that is opened in the navigation group of a tab. This way using two windows going back and forth will illustrate the issue.
If "layout: 'vertical'" is commented and "top" attribute of the labels is commented out, the flickering disappears.
var tabGroup = Titanium.UI.createTabGroup({
visible: true
});
var tabWindow = Titanium.UI.createWindow({
title: 'Tab window',
url: 'tabWindow.js',
backgroundColor: 'white'
});
var tab = Titanium.UI.createTab({
icon: Titanium.UI.iPhone.SystemIcon.MORE,
title: 'Tab',
window: tabWindow
});
tabWindow.navGroup = tab;
tabGroup.addTab(tab);
tabGroup.open();
var win = Titanium.UI.currentWindow;
var btn = Titanium.UI.createButton({
title: 'open',
style: Titanium.UI.iPhone.SystemButtonStyle.DONE
});
btn.addEventListener('click', function(e){
var newWin = Titanium.UI.createWindow({
title: 'New window',
url: 'newWindow.js'
});
win.navGroup.open(newWin, {
animated: true
});
});
win.add(btn);
var win = Titanium.UI.currentWindow;
var sectionView = Ti.UI.createView({
backgroundColor: 'transparent',
height: 40,
left: 10,
top: 0,
width: 280
});
var sectionHeaderLabel = Titanium.UI.createLabel({
left: 15,
height: 40,
text: 'This is section header',
backgroundColor: 'transparent'
});
sectionView.add(sectionHeaderLabel);
var sectionView = Titanium.UI.createTableViewSection({
backgroundColor: 'transparent',
headerView: sectionView
});
for (var i = 0; i < 5; i++) {
var row = Titanium.UI.createTableViewRow({
height: 40,
layout: 'vertical',
selectionStyle: Ti.UI.iPhone.TableViewCellSelectionStyle.NONE,
hasChild: false
});
var rowLabel = Titanium.UI.createLabel({
left: 10,
// top:0,
height: 25,
width: 270,
text: 'Text label ' + i,
textAlign: 'left'
});
row.add(rowLabel);
var rowLabelDetails = Titanium.UI.createLabel({
left: 10,
// top:26,
height: 10,
width: 270,
font: {
fontSize: 12
},
text: 'little text '+i,
backgroundColor: 'transparent',
textAlign: 'left'
});
row.add(rowLabelDetails);
sectionView.add(row);
}
var data = [];
data.push(sectionView);
var tableview = Titanium.UI.createTableView({
style: Titanium.UI.iPhone.TableViewStyle.GROUPED,
backgroundColor: 'white',
data: data,
scrollable: true,
top: 5,
left: 10,
width: 300
});
win.add(tableview);
Thank you N.Nedev for such a well-defined and conscientious ticket. Assigning to iOS project lead...
This is no longer occurring with the following environment; iPhone 6 (10.2) Studio 4.9.1.201707200100 Ti SDK 6.1.2 GA Appc CLI 6.2.3 Ti CLI 5.0.14 Alloy 1.9.13 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131