Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - programmatically create GlSurfaceView
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Feb 8, 2018
1 parent 7bccc9d commit aeba621
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ protected void onSurfaceCreated(GL10 gl, EGLConfig config) {

addView(textureView, 0);
} else {
GLSurfaceView glSurfaceView = (GLSurfaceView) findViewById(R.id.surfaceView);
GLSurfaceView glSurfaceView = new GLSurfaceView(getContext());
glSurfaceView.setZOrderMediaOverlay(mapboxMapOptions.getRenderSurfaceOnTop());
mapRenderer = new GLSurfaceViewMapRenderer(getContext(), glSurfaceView, options.getLocalIdeographFontFamily()) {
@Override
Expand All @@ -302,7 +302,7 @@ public void onSurfaceCreated(GL10 gl, EGLConfig config) {
}
};

glSurfaceView.setVisibility(View.VISIBLE);
addView(glSurfaceView, 0);
}

nativeMapView = new NativeMapView(this, mapRenderer);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">

<android.opengl.GLSurfaceView
android:id="@+id/surfaceView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
android:visibility="gone"/>

<FrameLayout
android:id="@+id/markerViewContainer"
android:layout_width="match_parent"
Expand Down

0 comments on commit aeba621

Please sign in to comment.