How to set the starting position of a ScrollView?

后端 未结 6 1632
野趣味
野趣味 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:00

    After several hours internet searching

    this worked for me :

    ScrollView.post(new Runnable() {
    @Override
    public void run() {
    //setting position here :
            ScrollView.scrollTo(X, Y);
        } 
    });
    

提交回复
热议问题