Since 1.8.1 scrollable views are flickering when views are updated
Reported by Matthias Fliegner | April 2nd, 2012 @ 01:45 PM
My application runs on iOS and mainly consists of a scrollable view (horizontal slide) with 3 views attached to it.
The views of the scrollable view are added and removed dynamically when the user scrolls. Through this only 3 views remain attached to the scrollable view at any time. On each of these 3 views I have multiple objects (views, labels etc.) and the content to be displayed.
This is how it works:
- If the user scrolls forward I simply remove the view [0], add a
new view to the end and set the current page of the scrollableview
to 1. - If the user scrolls backwards I shift the views of the
scrollableview, need to add a new view to the start (view[0]) and
set the current page of the scrollableview to 1.
The routine is commonly used by other developers as well. This is because large scrollable views do have bad performance.
I can prove that scrolling forward is a bit slower in Titanium Version 1.8.2.. But it is quite ok and not the problem.
But scrolling back is also slower in 1.8.2.. Because of this I am running into a serious flicker problem when I do need to reorder/add a new view at the start of the scrollableview.
In 1.8.1 there has not been a flickering when assigning an array with new views to the scrollable view and setting the current view. But in 1.8.2. the user sees that the views of the scrollableview change because of the array assignment and shortly later because of the repositioning of the current view page back to 1.
It seems that changes made to the views of a scrollableview in Titanium > 1.8.2 are made that slow that the user recognizes it on display. :-( That's a show stopper especially if you need to use a dynamic scrollableview consisting of only 3 views.
It would be great if > 1.8.2 would offer the same performance/behaviour as 1.8.1 so that the flicker would not occur.
Here is the code which is executed when moving backwards:
// add new scrollview at start arrViews[0] = fncVwQuestarrTcqID[intTePos - 1]);
// shift views arrViews[1] = svQuest.views[0];
arrViews[2] = svQuest.views[1];
// remove last view of scroll view svQuest.removeView(svQuestviews[2]);
svQuest.views = arrViews;
svQuest.currentPage = 1;
// resize scroll view items fncReSizeSVView(0);
If necessary I can provide the rest of the source code or a video of the problem.
No comments found
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »