I tried using both ScrollView and ListView.
I realized that if I use ListView and I click on one of the elements, let the current fragment be replaced by the next fragment and click the "Back" button for the preliminary fragment. The scroll position of the ListView will be kept in the same position. But if I use ScrollView, it will not.
I do not understand why they are different? And how can I get ScrollView to maintain its position after clicking a button?
Actually, I was looking for an answer in StackOverflow. But I want to know the reasons and find an easier way to make ScrollView and ListView have the same behavior.
Please help me! Thanks!
source share