Titanium Community Questions & Answer Archive

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

animation in TableView scrollToIndex

Hi,

I don't understand how can I use the second argument (properties) in Titanium.UI.TableView.scrollToIndex.
My TableView renders showing the first row (index 0) and so on. I would like it to scroll with animation (possibly with easing out) to an arbitrary index lower in the tableview (eg. index 25).

Best regards,
Matej

— asked September 15th 2010 by Matej Franca
  • animation
  • mobile
  • scrolltoindex
  • tableview
0 Comments

4 Answers

  • Thank you for your answer.
    I'm developing an app for Android and the method scrollToIndex works as expected (it jumps to the row with specified index).

    Instead of jumping I would like it to smoothly scroll with animation, but I don't know how to specify the animation properties.

    Thank you,
    Matej

    — answered September 15th 2010 by Matej Franca
    permalink
    0 Comments
  • try this way ( untested)

    
    the_table.scrollToIndex( 3, {animation:Titanium.UI.ANIMATION_CURVE_EASE_OUT});
    

    Let me know, I might need it as well :)

    — answered September 15th 2010 by Dan Tamas
    permalink
    0 Comments
  • Than you, Tamas..
    It's not working. I also tried with an animation object, but to no avail..
    Maybe it works only on iPhone, as I found a number of examples here on the forum, which use scrollToIndex with animation.

    Maybe someone from the development team could shed some light on this?

    Pretty please? :)

    — answered September 15th 2010 by Matej Franca
    permalink
    0 Comments
  • The second argument gives you the final position of the row you scroll to

    http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.iPhone.TableViewScrollPosition-object

    — answered September 15th 2010 by Dan Tamas
    permalink
    0 Comments
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.