FlexibleAdapter
FlexibleAdapter copied to clipboard
FlexibleAdapter return to RecyclerView position changes
Version 5.0.1 The problem is: I have RecyclerView with sticky headers and several items related to each header. When I change my view to another and return back to view with RecyclerView, position of items in RecyclerView changes (I call update adapter data method with content items each time I return back to this view). Usually it scrolls down by several positions. Amount of positions is not determined.
The question is: how could i scroll back to relevant position. I tried to use RecyclerView scroll methods, but result is quite disappointing, because it scrolls content wrong in very unpredictable way.
I tried to use FastScroller, but i don't actually understand how to use it correctly and could it be used for such purposes.
I suppose that there are some ways to scroll content using FlexibleAdapter features, but i can't find any solutions of this problem on the Web.
@InspectorZheleshka, strange. Are you trying to scroll via code or manually? FastScroller sync has been fixed in 5.0.5.
@davideas, i have already tried to scroll it via code, using RecyclerView default functions, e.g. scrollTo(...), scrollToPosition(...): [ I tried to use RecyclerView scroll methods, but result is quite disappointing, because it scrolls content wrong in very unpredictable way.] Talking about FastScroller: I haven't used it in my project by default. But I have tried to use FastScroller to scroll RecyclerView to the required position (before changing view) via code, I thought it could help to deal with this bug. But all functions I have tried moved FastScroller element on screen, not the FastScroller slider. So I don't even understand is it a good idea to use FastScroller to scroll RecyclerView via code. Maybe there are some other features?
Here are some screenshots to show you what is my problem. Steps:
- Scroll to some position
- Change my view to details
- Press [back] button and navigate to my list. You can see, that list content have been scrolled by several positions. That is my problem, it automatically scrolls itself every time.
