This happens because you let ScrollView get the focus, so it scrolls. If you have Baidu, you may find that some blogs will say that the focus stops in a fixed view. This is true for pages that do not have a refresh, but when you have a situation like a timed refresh of the page, you will find that this method is not working. Because once the refresh after the focus of control is not easy to get. Then you have to mention a less-used attribute--android:descendantfocusability
This property defines the relationship between the ViewGroup and the child controls when one gets the focus for the view. There are three types of values for the property:
Beforedescendants:viewgroup takes precedence over its subclass control and gets to focus
Afterdescendants:viewgroup gets focus only if its subclass control does not need to get focus
Blocksdescendants:viewgroup overrides the subclass control and gets the focus directly
This is much more convenient, as long as we add a third attribute to the linearlayout inside the ScrollView to ensure that no matter how the content changes will affect the scrolling situation.
About banning Android ScrollView from scrolling automatically due to content changes