I'm pretty much new to Android Studio, with less than a month's experience. I'm aware of the activity life cycle and all the methods like onCreate, onPause, OnResume, onSaveInstanceState and onRestoreInstanceState.
I'm working on a news app that takes information from a JSON feed and shows the news headlines for various categories. I was able to display the info on the screen using a list view and a custom adapter. I also created a menu for different categories.
Using onSaveInstanceState, I was able to retrieve the category which I had selected after changing the device orientation. However, when I scroll down the list view until the very end and then change the device orientation, the list view goes up to the top.
Is there a way to save the scroll position before the device changes its orientation?
I've tried out all the solutions mentioned in this thread - Maintain/Save/Restore scroll position when returning to a ListView, but the bug isn't removed.