Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Android: Scrollable view Tips!

  1. Use showPagingControl:true. Otherwise, if the user tries navigating with the trackball the app will crash.

  2. 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 a setTimeout in the scroll event. Something like that:

    setTimeout(function(e)
    {
    var current_page = scrollView.currentPage;
    current_page++; 
    //do what you need to do with it
    },500);
    
  3. Try avoiding the control for the moment, on slower devices it's reaaally slow…

— asked November 24th 2010 by George Marmaridis
  • android
  • scrollable
  • tips
  • view
0 Comments

1 Answer

  • Thanks - good tips, George! :)

    — answered November 24th 2010 by Paul Dowsett
    permalink
    1 Comment
    • I must add to this, that the advice above is true as of android 1.4.X. The situation may obviously change for future versions.

      — commented November 24th 2010 by Paul Dowsett
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.