Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2454] ScrollableView Push Views bug on 1.5

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-07-20T14:54:38.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterBrice Lechatellier
AssigneeNeeraj Gupta
Created2011-04-15T03:20:15.000+0000
Updated2017-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;
});

Comments

  1. Renato Formato 2011-04-15

    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.

  2. Neeraj Gupta 2012-07-21

    Does not reproduce with release 2.1.0.
  3. Lee Morris 2017-03-09

    Closing ticket as the issue cannot be reproduced.

JSON Source