RecyclerView's textview store/restore state in android fragment not working <p>I am developing one android application my problem structure is like this.</p> <p>One activity contains one fragment and this fragment contains one RecyclerView. RecyclerView item contains two textviews which displays simple text like this :</p> <pre><code> TextTitle TextValue --&gt; item1 TextTitle TextValue --&gt; item2 TextTitle TextValue --&gt; item3 </code></pre> <p>If User taps on text value, its value gets changed (Value is binary so it will be only two). If user change first two item's value by tapping and I want to restore those two values when I will come back to this fragment with a help of restore/save state.</p> <p>I followed many articles and gather information that if I have to use proper unique id in item's view layout for both textviews then recyclerview state will be stored automatically, only just you need to save whole recyclerview state. Its not working in my case. What am I doing wrong? Do I need to fill adapter again?</p> <p>any help would be appreciated.</p> <pre><code> @Override public void onSaveInstanceState(@NonNull Bundle outState) { super.onSaveInstanceState(outState); outState.putParcelable(INSTANCE_STATE_CONTENT_RECYCLER_VIEW,recyclerView.getLayoutManager().onSaveInstanceState()); } // again restore it restore it if (recyclerViewState != null) { recyclerView.getLayoutManager().onRestoreInstanceState(recyclerViewState); recyclerViewState = null; } @Override public void onViewBound(@Nullable Bundle savedInstanceState) { //super.onViewBound(savedInstanceState); if (savedInstanceState != null) { recyclerViewState = savedInstanceState.getParcelable(INSTANCE_STATE_CONTENT_RECYCLER_VIEW); } // continue with my work. } </code></pre>