Titanium Community Questions & Answer Archive

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

Can you lock a TableView down and prevent the "rubber band" effect?

My tableviews are small and only include a few rows of data. Is it possible to lock them into position?

Currently you can pull them up and down with your finger and they snap back into position ("rubber band" effect).

— asked April 1st 2010 by Christopher Webb
  • 0_o
  • band
  • elastic
  • iphone
  • lock
  • mobile
  • position
  • rubber
  • tableview
0 Comments

6 Answers

  • try this parameter:

    moving:false
    
    — answered April 1st 2010 by Glenn Tillemans
    permalink
    0 Comments
  • @Gleen, thanks for the quick response! I tried inserting that into the tableView constructor to no avail. Any ideas?

    var tableView = Titanium.UI.createTableView({
        data:data,
        moving:false,
        style:Titanium.UI.iPhone.TableViewStyle.GROUPED,
        top:120
    });
    view.add(tableView);
    

    So are we saying this is a bug???

    — answered April 1st 2010 by Christopher Webb
    permalink
    0 Comments
  • Try calling e.preventDefault() on all of the touch events (except click):

    tableView.addEventListener('touchmove', function(e)
    {
        e.preventDefault();
    });
    

    See the TableView API for a complete list of events.

    — answered April 2nd 2010 by James K
    permalink
    0 Comments
  • That failed to work too. I'll pass this onto the Appcelerator team.

    — answered April 2nd 2010 by Christopher Webb
    permalink
    0 Comments
  • You can use scrollable: false in your tableView

    That should do the trick.

    — answered June 18th 2013 by Karl Svensson
    permalink
    0 Comments
  • Hi Christopher,

    Simple use touchEnabled:false and along with this use bubbleParent:false also so that parent view receive touch event.

    — answered June 19th 2013 by Ashish Nigam
    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.