I’m having trouble in customizing new ScrollView in following case:
I want my scrollview reload new content when dragging down a distance. While loading new data the scrollview have to stop bouncing back to top y = 0 (it should bounce back to y = 50px), then user can see the loading icon progress there. After new content loaded, the scrollview bounce to y = 0 to hide the loading icon.
Can any one give me a clue to do this in Corona? Now I’m using widget.newScrollView, is there any way to let the scrollview stop at y=50px when bouncing back to wait for new data loading, and then bounce back to y = 0 when data loading is completed.
Sorry for missing your earlier question. The code works. You need to get the widgets 1.0 version and put it in the project folder. Code is a little complicated and hard to follow but it works and is a joy to see it in action. Hope this helps.
Corona can do this. You need to program it to do it. For example, to respond to your specific question…
is there any way to let the scrollview stop at y=50px when bouncing back to wait for new data loading, and then bounce back to y = 0 when data loading is completed.,
scrollView:scrollToPosition({y=50, time=0}) and
scrollView:scrollToPosition({y=0, time=0})
will get you the desired scrollView behaviour.
The enhanced widgetDemo link I mentioned a few posts above has the pull to refresh nicely implemented. Best to go over it and try to make it work.
Sorry for missing your earlier question. The code works. You need to get the widgets 1.0 version and put it in the project folder. Code is a little complicated and hard to follow but it works and is a joy to see it in action. Hope this helps.
Corona can do this. You need to program it to do it. For example, to respond to your specific question…
is there any way to let the scrollview stop at y=50px when bouncing back to wait for new data loading, and then bounce back to y = 0 when data loading is completed.,
scrollView:scrollToPosition({y=50, time=0}) and
scrollView:scrollToPosition({y=0, time=0})
will get you the desired scrollView behaviour.
The enhanced widgetDemo link I mentioned a few posts above has the pull to refresh nicely implemented. Best to go over it and try to make it work.