title: Using GLSurfaceView class with android xml layouts
body: <p>I want to make use of the android xml layouts. I have put a glSurfaceView in a frame layout to use in conjunction with a linear layout like so...</p>
  
  <p></p>
  
  <pre><code>&lt;FrameLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_weight="1"&gt;
  
  &lt;android.opengl.GLSurfaceView android:id="@+id/surfaceviewclass"
  android:layout_width="match_parent"
  android:layout_height="match_parent"/&gt;
  
  &lt;/FrameLayout&gt;
  
  &lt;LinearLayout android:id="@+id/gamecontrolslayout"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_weight="5"
            android:background="@drawable/backdrop"&gt; 
  //some layout stuff
  
  &lt;/LinearLayout&gt;
  &lt;LinearLayout&gt;
  </code></pre>
  
  <p>I then call my layout like so </p>
  
  <pre><code>setContentView(R.layout.main);
      GLSurfaceView glSurfaceView = (GLSurfaceView)findViewById(R.id.surfaceviewclass);
  </code></pre>
  
  <p>in onCreate();</p>
  
  <p>How can I call my glSurfaceView so that I can make use of the xml layouts like this and also reference my own GLSurfaceView class (below is code that references my own GLSurfaceView class)...</p>
  
  <pre><code>glSurfaceView = new MyGLSurfaceView(this);
      setContentView(glSurfaceView);
  </code></pre>
  
  <p>Is there anyway of combining these two?  I want to do this cos I've got a load of stuff going on in my glSurfaceView class like file loading and touch events. And only I've just thought about implementing this new layout</p>