Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28228] Android: Add TableView "moveable" support

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2021-01-27T18:23:27.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.3.1
ComponentsAndroid
LabelsTableView, android, parity
ReporterJoshua Quick
AssigneeGary Mathews
Created2020-11-06T01:51:33.000+0000
Updated2021-04-27T16:45:12.000+0000

Description

*Summary:* On iOS, a TableView's rows can be moved via drag-and-drop by setting the TableView object's "editing" and "moveable" properties to true. We should add the same on Android for parity. _(Note that "moveable" property is ignored unless "editing" is set true.)_ https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableView-property-moveable *Note:* iOS also allows you to configure each row's "moveable" property as well. If undefined, then the row defaults to using the TableView's "moveable" property value. https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableViewRow-property-moveable

Comments

  1. Gary Mathews 2021-01-07

    master: https://github.com/appcelerator/titanium_mobile/pull/12298
  2. Muhammad Qasim 2021-04-26

    Would this work same as on iOS? For me nothing happens if I set TableView's moving property to true and rows are still not moveable. Not sure what I'm missing. Is there any example for Android somewhere? I can't find it in KitchenSink.
  3. Joshua Quick 2021-04-26

    [~appsol], you have to "long press" the row on Android before you can start dragging it. That's the built-in native behavior. The phone will typically vibrate when long pressed and the row will show a drop-shadow elevation. There is sample code in the above github link.
  4. Muhammad Qasim 2021-04-27

    @Joshua Quick Ah the problem turned out to be the spelling :) Everywhere the property name is *_"moveable" _*but in the above Github example its *_"movable"_* Changing the property name to "movable" on Android worked.
  5. Joshua Quick 2021-04-27

    [~appsol], you're right. The spelling between Android and iOS for this property is inconsistent. And Android's spelling does not match the api docs.

JSON Source