我怎么能等待地图的生成做一些动作?

问题描述 投票:1回答:1

我与在Android Studio中的地图活动的工作。我需要等待的LocationListener的获取用户的第一位置启动功能。我能怎么做?

android google-maps-android-api-2
1个回答
0
投票

您可以等待回调onMapReady,你可以知道你的地图不为空:

@Override
public void onMapReady(final GoogleMap googleMap) {
   //your code
}
© www.soinside.com 2019 - 2024. All rights reserved.