Native scrolling a group with dynamic content
Posted: Sat May 09, 2015 5:51 pm
Does anyone have a neat way of using a native scroller to scroll a group (containing other groups) with elements that may show or hide depending on interaction?
If I set the visibility of the items then I need to reset (destroy and recreate) the scroller, otherwise it goes haywire, even though the elements shown and hidden are the same size and location. If I recreate the scroller, the scroll location jumps to the top and the page layout skips, so the user has to scroll back to the original place. I have tried saving the current vscroll property of the scroller with mobileControlGet (tScrollerID,"vscroll") and then destroying and recreating the scroller, then using the saved value with mobileControlSet tScrollerId, "vscroll", tVscroll. For good measure I have also set the vScroll of group "ScrollingGroup" to tVscroll. It kind of works every so often, but mostly just leaves a haywire scroller working on different parts of the scrolling group.
Any advice?
Thanks
If I set the visibility of the items then I need to reset (destroy and recreate) the scroller, otherwise it goes haywire, even though the elements shown and hidden are the same size and location. If I recreate the scroller, the scroll location jumps to the top and the page layout skips, so the user has to scroll back to the original place. I have tried saving the current vscroll property of the scroller with mobileControlGet (tScrollerID,"vscroll") and then destroying and recreating the scroller, then using the saved value with mobileControlSet tScrollerId, "vscroll", tVscroll. For good measure I have also set the vScroll of group "ScrollingGroup" to tVscroll. It kind of works every so often, but mostly just leaves a haywire scroller working on different parts of the scrolling group.
Any advice?
Thanks