AnimateLayoutChanges fail in recycler view - android

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 ?

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.

Gaps in between recyclerview items when view inside item is shown/hidden

I am using recycler view with linear layout manager, based on some logic I am hiding/showing a view inside recycler view item.
Issue Problem occurs when I scroll, I can see some gaps in between recycler view item, which are random when scroll. If I hide the view always , then there is no issue, but I need to show and hide based on some logic and when implemented the gaps are coming as well.
Assumption One thing I am sure of is that the issue is there because of hiding/showing a view.

Android RecyclerView scrolls to top when child element is expanded/collapsed

I have a list of elements in a recycler view that are generated dynamically using data binding. Each element has a bottom view that is initially set to View.GONE, however once a user clicks the element and the view is expanded, the recycler view automatically scrolls back to the top of the list. Conversely, if the view is expanded and then clicked again to collapse, the recycler view scrolls to the top of the list again. I have tried keeping track of the ID's of the elements for the adapter (again using data binding), setting focus to the child element when they expand or collapse, and using binding adapters to animate the expand/collapse itself.
My suspicion is that the adapter in the recycler view is receiving a onNotifyDataChanged() alert when the height of one of the child changes, rendering an additional view (still inside one of the children though, not a separate child in the list), and automatically scrolls to the top. Is there a way to override this? Does anyone know what else might be causing the list to snap to the top when one of the elements is clicked -> expanded/collapsed?
So I found the solution to my issue in case someone encounters something similar. I actually ended up finding this answer: RecyclerView notifyDataSetChanged scrolls to top position
and the second solution involving the staggered layout manager was the route I went with, since I want to be able to wrap the content. My suspicions were correct that it had to do with the changing height of the elements in the recycler view. The expandable item's parent wrapped content, so the recycler view was forced to recalculate the size of the item once the expandable portion appeared/disappeared (at least that's what I got out of it).

How to scroll a view above a list view with the list view (Not with header views....)

So to be clear, I can solve this with a header view and trickiness, but I'd rather not.
I'd like to have a set of tabs (which also contains some profile information) above a view pager, which could have multiple pages, where each page has a list view. I'd like when you start scrolling initially, that the above tab / profile view will move with the list view (so if you try scrolling the list view, the area above scrolls up) and once the listview is scrolled down until it is at the first item, that the above view starts to scroll back into view.
This is not solveable with a header view, as far as I can tell, without stuffing this profile / tab view into the header of every list view the view pager holds, and to keep them in sync (which just sounds silly).
I feel there's a way I can make use of onInterceptTouchEvent with a custom layout / scrollview of sorts, any tips on doing this?

FooterView for grid view

I want to add footer view to GridView in android as we can add to ListView. Since it is not available in Grid View, I added a loading layout at bottom of screen, and a grid view above it. Loading layout becomes visible when we scroll grid view till end. But when loading layout becomes visible, on scrolling upwards, it remains visible. How this can be customized in a way similar to footer of list view. Any help will be highy appreciated.
Grid View doesnot have footer similar to listview. Its workaround used was: Add a view having progress dialog at bottom of screen below gridview and manage its visibility.

Categories

Resources