I have tabView, displaying list in each tab. When I scroll in one tab, switch to another tab and return to previous tab, position is returned to the top instead of displaying pr
Override onSaveInstanceState
to save the position, and set the position back in onRestoreInstanceState
. The Bundle is sort of like a HashMap, (pseudo-code):
In onSaveInstanceState
:
bundle.putInt("MyTabsPosition", getPosition());
Then in onRestoreInstanceState
:
pseudo.setPosition(bundle.getInt("MyTabsPosition"));