@Joseinnewworld is back!
— Gaexe (@gaexe_) May 28, 2025
Thankyou for sweeping several of my #NFTs! 🙌
Your support means everything. Enjoy the perks, flex your collectible, and unlock the full Gaudio experience. 🎧💎 #eCash $XEC #BlockchainFuture pic.twitter.com/Qp6SuJ5oQh
Hi guys, recently I was faced with the case of creating a nested recyclerview display, and each item is editable, then when I update the related item and then refresh the recyclerview, I started to get overwhelmed when I didn't know how to maintain the scroll focus position, because by default when the recyclerview is refreshed, the scroll position returns to the top.
Okay, after surfing for quite a while, I finally found what I was looking for. Here are some easy steps to maintain the current position of the recyclerview when it is refreshed.
// Save state
private Parcelable recyclerViewState;
recyclerViewState = recyclerView.getLayoutManager().onSaveInstanceState();
// Restore state
recyclerView.getLayoutManager().onRestoreInstanceState(recyclerViewState);Done!
