[android] dismiss the foreground color only when the style is loaded

This commit is contained in:
Łukasz Paczos
2018-12-14 15:49:38 +01:00
committed by Łukasz Paczos
parent d26d2f69f1
commit 49e870ce72

View File

@@ -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);
}
}
}