Titanium Community Questions & Answer Archive

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

How to set data to a table view without animation?

I use table views to display asynchronly loaded data using setData. Because the table view is already displayed, I see some animation and it seems that rows are inserted from top to bottom, each sliding down. Is there a way to omit that behavior? I want the data to be just there - without any animation. I tried the line below (guessed from the kitchen sink example) but the animaed property has no effect.

tableView.setData(data,
  {animationStyle: Titanium.UI.iPhone.RowAnimationStyle.NONE});
— asked March 12th 2010 by Stefan Matthias Aust
  • animation
  • tableview
0 Comments

6 Answers

  • Still not working 1.3
    in KitchenSink - iPad
    main-tests.js

    MainTests.detailWindow.animate({view:e.rowData.v,transition:Ti.UI.iPhone.AnimationStyle.NONE});
    

    does'nt work. No view update!

    — answered June 16th 2010 by Bernard van den Eynde
    permalink
    0 Comments
  • I have the same problem. I think it is a bug. Devs, can you fix this?

    — answered May 1st 2010 by Sindre Sorhus
    permalink
    0 Comments
  • See https://appcelerator.lighthouseapp.com/projects/32238/tickets/815-table-view-updates-and-animation; it sadly appears that it's working as-designed, meaning you're not supposed to be able to prevent the animation :(

    — answered May 24th 2010 by Matthew Lieder
    permalink
    0 Comments
  • i tested the code above in head (upcoming 1.4 release) and it works fine, no animation.

    in 1.4, you can also pass a null data value too.

    i updated Kitchen Sink to demonstrate this as well as re-loading w/o animation.

    — answered May 31st 2010 by Jeff Haynie
    permalink
    0 Comments
  • It was a bug fixed in 1.3.0; once I changed my API version to that it worked :)

    — answered June 1st 2010 by Matthew Lieder
    permalink
    0 Comments
  • This works:

    tableview.setData(data,{animated:false});

    I hope it is not too late…

    — answered November 18th 2011 by Ricardo Arguello
    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.