How to showing forefront button on android? -


i use glsurfaceview

and want button displayed in front of glsurfaceview

and xml

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="my package">  <button     android:layout_width="100dp"     android:layout_height="50dp"     android:text="back button"     android:id="@+id/btn_previous"     android:layout_alignparentbottom="false"     android:layout_marginbottom="45dp"     android:layout_alignparenttop="true"/>  <android.opengl.glsurfaceview     android:id="@+id/glview"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:layout_alignparenttop="true"     android:layout_alignparentleft="true"     android:layout_alignparentstart="true"/>  </relativelayout> 

this source not showing button. think behind glsurfaceview

please advice me

thanks.

exchange glsurfaceview , button's positions, this:

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="my package">  <android.opengl.glsurfaceview     android:id="@+id/glview"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:layout_alignparenttop="true"     android:layout_alignparentleft="true"     android:layout_alignparentstart="true"/>  <button     android:layout_width="100dp"     android:layout_height="50dp"     android:text="back button"     android:id="@+id/btn_previous"     android:layout_alignparentbottom="false"     android:layout_marginbottom="45dp"     android:layout_alignparenttop="true"/>  </relativelayout> 

Comments