New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag & Drop in a GridLayoutManager #3
Comments
I wasn't actually testing it with GridLayoutManager as this lib is more like example of what could be done, however first thing you should look at is that views are only move by Y axis, so you'd need to change this... that probably would be enough.. |
Thank you for the suggestion, that was what I needed. I successfully implemented X/Y axis dragging/dropping. You were right - I just needed to account for the X axis movement. Here is a Gist to my listener. https://gist.github.com/ruckus/a4f831d8dce785c91aed If you would like me to fork your repo and provide a pull-request with this addition then just let me know. Thanks again! |
Hi, great, yes, I believe community will benefit if you provide implementation for a GridLayout, thanks! |
Hello, I'm very rookie when it comes to pulling off other projects' APIs and implementing some of their code into my own. I want to include features for my RecyclerView like bringing up a contextual action bar with ease upon long clicking a card, or swiping cards to archive them. I don't understand how I can implement your code to my own so that I can design a new function for, say, swiping, so that the swiped card does what { I } desire to do, but with the ease that your sample code shows. Please help or set me in the right direction? |
Thanks for the fantastic library.
I'm trying to implement drag-and-drop with a GridLayoutManager.
In my
Activity.onCreate
I have declared the grid:And I do get a grid of 2 columns. However, when I go into drag-and-drop mode I can only move within the column, I cannot move left or right.
I'm pretty sure I need to muck around in
DragDropTouchListener.switchViewsIfNeeded
but I'm not sure.Any suggestions on how to tackle this? Thanks!
The text was updated successfully, but these errors were encountered: