Android OPENGL + XML Integration

I am making an application for a media player in android, where one part of my screen has an animation created in OpenGL (of course, with Android / JAVA) ..... So, my screen consists of two parts: 1) The left side consists of all widgets (using xml). 2) The right side consists of animations made in OpenGL.

I can do Gui (part of xml) as well as animation (opengl). Can I integrate a GUI created in an XML file with animation (using GLSurfaceview)?

+3
source share
1 answer

The APIDemos SurfaceViewOverlay example is the answer to my request .... In the XML file, I need to create the GLSurfaceView tag as follows:

            <android.opengl.GLSurfaceView android:id="@+id/glsurfaceview"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
+5
source

Source: https://habr.com/ru/post/1761692/


All Articles