Drag and drop for nested recycler view - android

I am trying to have a recycler view , which has another recycler view as its child ! i have successfully made the drag and drop work , but am stuck with how do i make the recycler view scroll - when the item has reached the top !
In onDrag :
event.y resets when i cross EVERY OTHER CHILD of the child's recycler view
v.y is also based on the children of the inner recycler view ! i have no way of knowing where the child is at WITH RESPECT to the parent/main recycler view

Related

Recycler View Not scrolled with another view in android studio

Recycler View Not scrolled with another view in android studio.
when i scroll with recycler view element , it scrolled well , but when i scrolled from another view . recycler view element not scrolled even if many recycler view elements are remaining.
i want to scroll fully from another view too.

using recycler view in item of another recycler view with itemtouchhelper

I want to use horizontal recycler view in the item of vertical recycler view but it uses ItemTouchHelper and when I trying to scroll child recycler view, parent item starting swiping instead of scrolling horizontal recycler view
how can I fix that?
Disable swiping for parent recyclerview by not attaching an Itemtouchhelper.

Recycler View scroll position is initially not on top

So, I've got this structure in my app:
RecyclerView
|
--> View
--> CustomListView
--> CustomListView
After all views are loaded in the adapters (RecyclerViewAdapter and the ListViewAdapters) my scroll position is about on the middle of the page - but my desired and initial scroll position should be on top.
So, I know I can change the scroll position through the recycler view, but the problem is: when should I do it? I don't have any callback from the adapters, so I don't know when all the views are loaded..
Any ideas?

Drag and drop a view into a recyclerview

How do i drag and drop a view (not in a recyclerview) into a recycler view at x position?
How do i display a temporary view to show the user where the item will be inserted within the recycler view if they were to drop at their current position?
Should I be implementing prepareForDrop() or something similar to do this? Simple examples will be a great help if possible.
I currently have an ItemTouchHelper to handle the onMove and onSwiped methods for list items already within the recycler view but don't know how to implement dropping a view from outside the recycler view into the recycler view itself.
Thanks

AnimateLayoutChanges fail in recycler view

After I put animateLayoutChanges="true" in my layout, recycler view starts to behave weirdly.
Default :
After I click couple times on items
Why does recycler view do this ?

Categories

Resources