diff options
author | Łukasz Paczos <lukas.paczos@gmail.com> | 2018-12-14 15:49:38 +0100 |
---|---|---|
committer | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2018-12-19 14:43:27 +0100 |
commit | 49e870ce723f7563a78b35a4145303f9f492159e (patch) | |
tree | 58ac3cd78e1535a82230d453f8b416f28116e615 | |
parent | d26d2f69f12bd5214b038e8d6678916066385bb0 (diff) | |
download | qtlocation-mapboxgl-49e870ce723f7563a78b35a4145303f9f492159e.tar.gz |
[android] dismiss the foreground color only when the style is loaded
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java index cc1ffbbd3d..0f70524653 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java @@ -1002,10 +1002,12 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback { @Override public void onDidFinishRenderingFrame(boolean fully) { - renderCount++; - if (renderCount == 2) { - MapView.this.setForeground(null); - removeOnDidFinishRenderingFrameListener(this); + if (mapboxMap != null && mapboxMap.getStyle() != null && mapboxMap.getStyle().isFullyLoaded()) { + renderCount++; + if (renderCount == 3) { + MapView.this.setForeground(null); + removeOnDidFinishRenderingFrameListener(this); + } } } |