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

Set and get Column id after a particular item dragged from one column into particular column #193

Closed KallepalliTirumalesh closed 3 years ago

KallepalliTirumalesh commented 3 years ago

Hi, Thank you for the library 1 Can you please share how to get an id of a particular column if an item is dragged from one column into another column and 2.How can we get the particular item details including id ,name etc of that particular item dragged into another column.

woxblom commented 3 years ago

If you implement the BoardListener then you will get a lot of different events when you drag and drop items.

BoardView::setBoardListener

KallepalliTirumalesh commented 3 years ago

i have implemented the listener ,how can i get the entire object of the particular item which is selected for dragging like the id,name,type after the drag ended etc

woxblom commented 3 years ago

you will get a call to void onItemDragEnded(int fromColumn, int fromRow, int toColumn, int toRow); then you need to used that information to fetch the correct object in the new adapter.

KallepalliTirumalesh commented 3 years ago

Thank You ,One last thing can u please share how can i get the particular column title of which the item is been dragged into particular column. i want the title of the particular column

woxblom commented 3 years ago

You need to BoardView::getHeaderView(int column), that will be a custom view which you have defined yourself. So then you need to find the title in that view yourself with findViewById.

KallepalliTirumalesh commented 3 years ago

You need to BoardView::getHeaderView(int column), that will be a custom view which you have defined yourself. So then you need to find the title in that view yourself with findViewById.

Thank You so much for your time Cheers...!