I use this one.^_^
// Save state
private Parcelable recyclerViewState;
recyclerViewState = recyclerView.getLayoutManager().onSaveInstanceState();
// Restore state
recyclerView.getLayoutManager().onRestoreInstanceState(recyclerViewState);
It is simpler, hope it will help you!
More Related Contents:
- recyclerview No adapter attached; skipping layout
- How to update RecyclerView Adapter Data
- How to add dividers and spaces between items in RecyclerView
- RecyclerView inside ScrollView is not working
- Get visible items in RecyclerView
- RecyclerView header and footer
- Scroll RecyclerView to show selected item on top
- RecyclerView store / restore state between activities
- How to hide an item from Recycler View on a particular condition?
- Dynamic form with repeating form
- How to show an empty view with a RecyclerView?
- How to save scroll position of RecyclerView in Android?
- How to know when the RecyclerView has finished laying down the items?
- How can a divider line be added in an Android RecyclerView?
- When switch fragment with SwipeRefreshLayout during refreshing, fragment freezes but actually still work
- Use RecyclerView inside ScrollView with flexible Recycler item height
- Recycle-view inflating different row :- Getting exception while binding the data
- Android RecyclerView: Change layout file LIST to GRID onOptionItemSelected
- Don’t collapse Toolbar when RecyclerView fits the screen
- How to update/refresh specific item in RecyclerView
- How to add a button at the end of RecyclerView?
- CardView inside RecyclerView has extra margins
- Android: RecyclerView content messed up after scrolling [closed]
- What is the equivalent of [NestedScrollView + RecyclerView] or [Nested RecyclerView (Recycler inside another recycler) in Jetpack compose
- RecyclerView﹕ No adapter attached; skipping layout
- Combining Two Arrays of Model Class Type Firebase Android
- Using Espresso to click view inside RecyclerView item
- Android : Control Smooth scroll over recycler view
- How to achieve a staggered grid layout using Jetpack compose?
- Is there any way to Show Google Admob in Android Recycler View