woxblom / DragListView

Drag and drop to reorder items in a list, grid or board for Android. Based on RecyclerView. Also supports swiping items in a list.
Apache License 2.0
693 stars 177 forks source link

Move item to other column programmatically #176

Closed guizot closed 3 years ago

guizot commented 3 years ago

I want to move item from first column (column_1) to other column (column_2) programmatically

can you tell me how to achieve that?

woxblom commented 3 years ago

You can use the BoardView::moveItem() method.

guizot commented 3 years ago

will it trigger BoardView.BoardListener? and onItemDragEnded?

woxblom commented 3 years ago

No it will not, it will just move it directly with no callback. But since you know that you moved it you can do the actions you need or manually call the same code that onItemDragEnded would have called.