I have a TableView where each row contains three labels. Two labels are left justified while the third is right justified.
The problem is that when the rows are created, the right label appears briefly on the left and outside the table, which is a group style. It's very quick, but you can still see it. It then is shown in the correct position.
This causes a flash condition when the label disappears and reappears.
Here is how I am creating the right-justified label:
var timeIn = Ti.UI.createLabel({ text: checkInDateTime, font:{fontSize:24}, right:10, height: 'auto', width: 'auto', textAlign: 'right' }); row.add(timeIn);Is there a way I can prevent this effect?
2 Answers
I think (but not sure) that you need to add your table to the view after you have populated it. At least I do that and I have not observed flashing on both iphone and android. Also, this helps to prevent new views from flashing, do this:
var newView = create view ... mainWindow.add(newView); setTimeout( function() { mainWindow.remove(oldView); }, 10);instead of:
var newView = create view ... mainWindow.remove(oldView); mainWindow.add(newView);
try to set a width to the label that flashes
Your Answer
Think you can help? Login to answer this question!