diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2018-01-24 12:21:08 +0100 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2018-01-24 15:13:17 +0100 |
commit | 4ff9fe762d2012080052b4c1fe3482286b30ca51 (patch) | |
tree | dd6fc6c8ba5029dc719821e2958b6e65ac30946c /platform/android | |
parent | fb5b8d34f20b696319cfc16838243265143ba972 (diff) | |
download | qtlocation-mapboxgl-4ff9fe762d2012080052b4c1fe3482286b30ca51.tar.gz |
[android] - rename initRenderSurface to onSurfaceCreated
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java | 19 |
1 files changed, 8 insertions, 11 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 7aa5d268d2..2e7d4c4270 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 @@ -297,7 +297,7 @@ public class MapView extends FrameLayout { mapRenderer = new TextureViewMapRenderer(getContext(), textureView, options.getLocalIdeographFontFamily()) { @Override protected void onSurfaceCreated(GL10 gl, EGLConfig config) { - initRenderSurface(); + MapView.this.onSurfaceCreated(); super.onSurfaceCreated(gl, config); } }; @@ -309,7 +309,7 @@ public class MapView extends FrameLayout { mapRenderer = new GLSurfaceViewMapRenderer(getContext(), glSurfaceView, options.getLocalIdeographFontFamily()) { @Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { - initRenderSurface(); + MapView.this.onSurfaceCreated(); super.onSurfaceCreated(gl, config); } }; @@ -321,16 +321,13 @@ public class MapView extends FrameLayout { nativeMapView.resizeView(getMeasuredWidth(), getMeasuredHeight()); } - private void initRenderSurface() { + private void onSurfaceCreated() { hasSurface = true; - post(new Runnable() { - @Override - public void run() { - // Initialise only when not destroyed and only once - if (!destroyed && mapboxMap == null) { - initialiseMap(); - mapboxMap.onStart(); - } + post(() -> { + // Initialise only when not destroyed and only once + if (!destroyed && mapboxMap == null) { + initialiseMap(); + mapboxMap.onStart(); } }); } |