Detect when Android v2 maps has loaded

前端 未结 3 2066
离开以前
离开以前 2020-11-28 10:42

I\'m writing a app that would take 9 snapshots of the map around an area when the user presses a button.

In loop, using this to move and save:

map.mo         


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 11:30

    Try using the ViewStub class to help you with lazy loading of your map. You can detect when the map is loaded using this code:

    public void onShowMap(View v) {
        // where you put the MapView layout in ViewStub view
        ViewStub.setVisibility(View.VISIBLE);
    }
    

提交回复
热议问题