我想像上面的屏幕截图一样显示项目数。
答案 0 :(得分:1)
您可以使用布局管理器获取项目的可见位置。您也可以从中获取当前位置。 喜欢:
LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder();
builder.addLocationRequest(mLocationRequest); // mLocationRequest is a Object of LocationRequest
LocationSettingsRequest locationSettingsRequest = builder.build();
SettingsClient settingsClient = LocationServices.getSettingsClient(this);
settingsClient.checkLocationSettings(locationSettingsRequest);