My Android application is a full-screen OpenGL ES 2.0 application, so the main content is the user extension GLSurfaceView. The action layout is as follows:
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/drawer_layout"> <FrameLayout android:id="@+id/content_frame" android:layout_width="match_parent" android:layout_height="match_parent" /> <ListView android:id="@+id/left_drawer" android:layout_width="240dp" android:layout_height="match_parent" android:layout_gravity="start" android:choiceMode="singleChoice" android:divider="@android:color/transparent" android:dividerHeight="0dp" android:background="#111" /> </android.support.v4.widget.DrawerLayout>
Then I add my GLSurfaceView using the addView method for FrameLayout. If I do not, the box works as expected.
The ListView seems to have pulled correctly when I held it, since I can no longer interact with GLSurfaceView until I hold it to the left. But it does not display at all, as GLSurfaceView is always displayed on it.
How to get DrawerLayout working with GLSurfaceView as its contents?
java android listview opengl-es
Timo Rothenpieler
source share