How to set the starting position of a ScrollView?

后端 未结 6 1514
野趣味
野趣味 2021-01-07 23:36

I have been trying to set the initial position of a scroll View but have not found a way. Does anyone have any ideas? Also I have a GoogleMaps fragment as a children of the

6条回答
  •  终归单人心
    2021-01-08 00:10

    Scrollview sw = (ScrollView) findViewById(R.id.scrollView);
    sw.post(new Runnable() {
         public void run() {
               sw.smoothScrollTo(0, 5000);
         }
    });
    

提交回复
热议问题