0

I want to create an indicator to show when user want to grouping item in recyclerview, i already create the code to handle the grouping and indicator, and the code to handle indicator show i place in ItemTouchHelper ActionStateDrag, the problem is when i debug i found that ActionStateDrag not get breakpoint when im still dragging item in the recyclerview and ActionStateDrag only get breakpoint when i start my drag in item, its there any solution or maybe ItemTouchHelper event that will get called while user still dragging item in recyclerview? Here My Code In ItemTouchHelper Event

Here My Code In Action State Drag to set value to the grouping border to show

  • You put the ActionStateDrag in the SelectedChanged event, so it will just call once if the selected item doesn't change. And when you are still dragging item in the recyclerview, the selected item doesn't change. – Liyun Zhang - MSFT Jul 18 '22 at 05:37
  • so where should i put the ActionStateDrag? @LiyunZhang-MSFT – andry fritzent Jul 18 '22 at 07:04
  • I'm afraid I can't understand what you want clearly. Can you show or description the effect you want? – Liyun Zhang - MSFT Jul 18 '22 at 09:01
  • the things that i want to create is to show a border when user dragging item to other item with the difference in the location of x and y is less than 3, its same like when we grouping an app in phone, i already add my code in ActionStateDrag to set value to show the grouping border that i already create so far @LiyunZhang-MSFT – andry fritzent Jul 19 '22 at 03:20
  • You can try to put the code about showing the border in the ItemTouchHelper's event, you can check [this link](https://stackoverflow.com/questions/65917310/recyclerview-itemtouchhelper-callback-dragging-swap-condition). – Liyun Zhang - MSFT Jul 19 '22 at 06:48

0 Answers0