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

Change BoardView Layout to GridView #177

Closed assaffeldman closed 3 years ago

assaffeldman commented 4 years ago

hi, first of all - GREAT library! I wanted to know if there is a way which I could display the BoardView columns as GridView cards? second, how can I get an id of dragged item, or get it's value? third, is there a way to disable drag & drop for the columns only?

woxblom commented 4 years ago

Hey!

  1. I haven't tried to display a column with grid layout yet. But you can try to add a grid layout manager with the ColumnProperties when you add the column and see if it works.

  2. In the BoardListener you have several callbacks you can get. If you implement onItemDragStarted for example you will get the column and row of the item and then you can get that item with getAdapter(column).getItemList().get(row)

  3. Do you mean dragging an entire column or dragging items between columns? If it is dragging entire columns then just dont add a columnDragView for the ColumnProperties. Of it is dragging items between columns then you can implement BoardCallback and then implement the canDropItemAtPosition method and return false if the columns differ.