Reputation: 2807
I want to stagger images or buttons around a layout in an artsy way so that they look like this wall
Any ideas on which layout to use or how to do this ?
Thanks for any help
or like this wall
Upvotes: 0
Views: 132
Reputation: 1415
for this you can follow this.
1- Create a recycler view with staggered layoutmanager.
2- Every child of recycler view implements onDragListener. you will get onDragEnter and exit evnets from there.
3- call startDrag of view on long press of a view. Keep track of which child you are dragging.
4- on Drop event just swap the values.
This is just a thought. with some more logic around, you can implement this.
Upvotes: 1