[TIMOB-2454] ScrollableView Push Views bug on 1.5
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-07-20T14:54:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Brice Lechatellier |
Assignee | Neeraj Gupta |
Created | 2011-04-15T03:20:15.000+0000 |
Updated | 2017-03-09T22:44:07.000+0000 |
Description
Opening a ticket and uploading a test case following this
Q&A:
http://developer.appcelerator.com/question/83731/scrollableview-push-views-bug-on-15#152371">
http://developer.appcelerator.com/question/83731/scrollableview-pus...
Hi,
1.5 seems to have a bug when pushing a new array of Views to an
existing scrollableView.
The previous views are still visible in the background and the app
starts to lag a lot...
Anyone experiencing this? The workaround is to loop through all the
views and removing them one by one using removeView, but if you
pass an empty array, the old views are still present in the
background.
Thanks, Brice
var w = Ti.UI.createWindow();
w.open();
var sv = Ti.UI.createScrollableView({height:200, showPagingControl:true});
w.add(sv);
var v = [];
Ti.Gesture.addEventListener('orientationchange',function(e){
v = [];
var color;
if(e.orientation == 1 || e.orientation == 2){
color = "#00ff00";
}else{
color = "#ff0000";
}
for (var j = 0;j < 5;j++){
v.push(Ti.UI.createView({backgroundColor:color}));
}
sv.views = v;
});
I have the same on ScrollableView.
On orientation change I recreate the ImageView inside my ScrollableView and i reassing to it with the property views.
The bug is visible only when I have just one ImageView to show, not with two or more images.
It appears after rotating twice the iPhone, when I start to see both the images, one over the other.
I've found no way to workaround it.
Does not reproduce with release 2.1.0.
Closing ticket as the issue cannot be reproduced.