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).
6 Answers
-
try this parameter:
moving:false
-
@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???
-
Try calling
e.preventDefault()
on all of the touch events (exceptclick
):tableView.addEventListener('touchmove', function(e) { e.preventDefault(); });
See the TableView API for a complete list of events.
-
That failed to work too. I'll pass this onto the Appcelerator team.
-
You can use
scrollable: false
in your tableViewThat should do the trick.
-
Hi Christopher,
Simple use touchEnabled:false and along with this use bubbleParent:false also so that parent view receive touch event.