Drag&Drop Bug
See original GitHub issueHey there,
I found a Drag&Drop bug. I reinstantiate my adapter instance every time in the onResume() method. The views, in particular the RecyclerView, does not get reinstantiated. When I start the fragment for the first time Drag&Drop works great, but when I minimize and afterwards maximize the app again (staying on the same fragment) Drag&Drop doesn’t work anymore.
This seems to be because mAdapter.setLongPressDragEnabled(true);
will be called twice with the same RecyclerView. But as this is a complete new Adapter instance the call should not behave in another way than before.
Greets, djuelg
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
DragDrop inside Popper Bug - material ui - Stack Overflow
DragDrop inside Popper Bug ... I have this Drag and Drop menu that loads when user clicks the menu icon. Then they select...
Read more >[ Bug]: Drag drop is not working · Issue #8022 - GitHub
Element dragging is successful in my case but dropping is not getting success. What is your expected behavior? Drag and drop should happen ......
Read more >Fix problem: Drag and drop not working in Windows
Drag and drop is no longer working in Windows 10 or Windows 11? Here's how to fix this problem in just a couple...
Read more >Drag and Drop Bug in Selenium and Selenium Tools Package
Drag and drop is a gesture in which the user selects a virtual object by grabbing it and dragging it to a different...
Read more >possible bug with drag and drop - AppleVis
possible bug with drag and drop. By Troy, 16 February, 2022. Forum. iOS and iPadOS. Has anyone else discovered this issue with drag...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@djuelg, when I use addToBackStack and going back I see the old fragment on the transparent background. I am not sure now, but BackStack could be useful when screen is divided with more fragments, so when you press back the fragments change and the others remain visible. That’s why I don’t add the fragments to backstack. Or maybe I should call popBackStack with some
if
.However, I’m glad you found a solution! 👍 If don’t need more help on this, you can close this issue.
Well I just managed to get it working somehow.
onDestroyView()
callback (wihtout this the RecyclerView would be empty on coming back viapopBackStack()