Recent projects have used a scrollview with a ListView or Gridview nested inside it. Originally, this was not very good, but the interface does not provide web resources, so I had to piece it together one by one. I am a hard-working programmer, and everyone knows it. ,
But after writing it, I found a problem. Every time I enter this page, the scrollview is not displayed at the top, but at the bottom or in the middle. This makes me very sad. After searching Baidu and Google, I finally tried it. I have found a method that can solve this problem, but it is not a perfect solution and occasionally it will not work. The code is as follows:
scrollview.smoothScrollTo(0,0);
If you use it after drawing the data in the listview, you will not feel the page jump.
If you have a better method, I hope you can give me some advice.