Android: Scrollable view Tips!
Use
showPagingControl:true
. Otherwise, if the user tries navigating with the trackball the app will crash.If you want to get the current page just after switching to a new view
touchend
event will only cause the actual swipe to never occure.. try getting it with asetTimeout
in thescroll
event. Something like that:setTimeout(function(e) { var current_page = scrollView.currentPage; current_page++; //do what you need to do with it },500);
Try avoiding the control for the moment, on slower devices it's reaaally slow…
1 Answer
-
Thanks - good tips, George! :)