Titanium Community Questions & Answer Archive

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

tableView row elements moving

Ok this should be renamed to: "tableView scrollable property being ignored"

Hi, I have a bit of a strange problem.

I have a table view with 2 rows which are simple images. Everything works great, except for one issue.

If I press and hold on a row and move my finger up or down the rows will move up or down (as if I'm scrolling the table). If I let go the rows will move back into their original place.

I've tried to set scrollable and movable to false, but no effect. Which brings me to my second question: how do i switch this off?

Here's a snippet of my table code:

http://pastie.org/1191490

UPDATE: From the best that i can tell, it would appear that the "scrollable" property is just being ignored on the device. It seems this problem is also present on the emulator and it will scroll no matter what options you throw at it. I've tried using tableViewRow's instead with the same result. Anyone?

— asked September 30th 2010 by Alex Borisov
  • android
  • flick
  • mobile
  • row
  • scroll
  • tableview
  • win32
0 Comments

2 Answers

  • It's a bug in the platform that will be fixed "someday" :/

    http://developer.appcelerator.com/question/14381/any-way-to-disable-tableview-scrolling

    — answered September 30th 2010 by Alex Borisov
    permalink
    0 Comments
  • I think the problem is different than just setting scrollable. In my experience the data property is dynamic and directly tied to the data array you send. Using that logic, it would seem that you would need to monitor the 'move' event of the table and then reorder your data to match the move that was attempted.

    Search for move on this page and look at the move event. It may help.

    http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.TableView-object.html

    There is an example file in the Kitchen Sink app called table_view_edit_and_move.js that handles moving. What are you trying to accomplish?

    — answered September 30th 2010 by John McKnight
    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.