Titanium Community Questions & Answer Archive

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

Any way to disable TableView scrolling?

I've got a TableView that is sized to fit the data it's holding perfectly, but it's annoying that a user can still drag the contents up and down within the border of the TableView.

Is there a way to disable scrolling on a TableView. I believe the iPhone SDK provides a method for this.

— asked April 9th 2010 by Alan McConnell
  • iphone
  • tableview
0 Comments

13 Answers

  • Accepted Answer

    This is not possible right now but a good feature request.

    I've added 2 tickets for 1.4.0 release for this. For iPhone, I have already fixed. Will apply to Android next.

    iPhone

    Android

    — answered May 29th 2010 by Jeff Haynie
    permalink
    1 Comment
    • How can I check the link?

      — commented February 22nd 2015 by Wang Dan
  • scrollable: false

    • worked for me, the 'moving' property doesn't seem to do anything.
    — answered June 21st 2011 by /\/ ; ) c /< ...
    permalink
    3 Comments
    • for me too..

      — commented June 28th 2011 by david brewer
    • for Android or for iPhone? Because it's not working on Android for me (sdk 1.7.1)

      — commented July 27th 2011 by Kathrin Holweger
    • Works on iPhone for me

      — commented May 27th 2014 by BDubbz W
  • One solution is to put a transparent view over the table. Don't forget to set the touchEnabled:true otherwise the view will forward the events to the tableview. On android you might want to use transparent disabled button as the overlay in some cases.

    — answered April 24th 2012 by Ondrej Urik
    permalink
    0 Comments
  • I know this is an OLD question, maybe at that time TableView didn't have that Property, but I've being using scrollable:false since Titanium SDK 1.6.x. And it's working as expected!

    FYI to disable manual scrolling in a ScrollableView just use touchEnabled : false.

    — answered May 11th 2012 by Cesar Estrada
    permalink
    0 Comments
  • @Glenn

    does this work for you? because it doesn't for me

    — answered April 9th 2010 by Christian Sigl
    permalink
    0 Comments
  • Doesn't work for me. I believe the moving property specifies whether or not the individual rows within the tableview can be moved up and down within the tableview, not if the tableview itself scrolls.

    — answered April 9th 2010 by Alan McConnell
    permalink
    0 Comments
  • moving: false
    

    Doesn't work. Any other ideas?

    — answered April 9th 2010 by Cedric Kastner
    permalink
    0 Comments
  • Try this:

    tableview.touchEnabled = false;
    
    — answered April 22nd 2010 by Markus Bergh
    permalink
    0 Comments
  • Neither moving nor touchEnabled work for me… :(

    — answered May 29th 2010 by Donnie Tognazzini
    permalink
    0 Comments
  • I realize this is an old thread, but in Titanium 3.0, disabling scroll on a scrollView is done by setting view.scrollingEnabled = false. This is effective if you want to e.g. make drag and drop on some elements within the scrollView, and don't want it scrolling as you interact.

    — answered January 26th 2013 by Dan Kronholm (Bitfabrikken)
    permalink
    0 Comments
  • scrollable: false worked for me.

    — answered September 12th 2013 by Ragini Shukla
    permalink
    0 Comments
  • try this in your tableview propperties:

    moving:false
    
    — answered April 9th 2010 by Glenn Tillemans
    permalink
    0 Comments
  • Here's the solution:

    For iOS:

    touchEnabled = false;
    

    That will allow swipes, though…

    For Android: create a view in the same spot (absolute positioning). Give it an opacity of 0. Make sure it's in front of the one you want to disable. If it's still clickable, make sure it's touchEnabled and then listen to the touchstart event. In it, just

    return false;
    
    — answered December 19th 2013 by Vince Bullinger
    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.