title: How to resize and move an SDLSurface on Android
body: <p>I'm trying to build a project with SDL2 on Android.</p>
  
  <p>My project requirements is to have half of the screen filled with the SDL surface, and the other half with some android buttons.</p>
  
  <p>I tried to edit the standard project to achieve this.</p>
  
  <p>This is my layout:</p>
  
  <pre><code>&lt;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" android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:id="@+id/sdl_view"
      tools:context="org.libsdl.app.SDLActivity"&gt;
  
      &lt;TextView android:text="@string/hello_world" android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_centerHorizontal="true" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And here's how I edited SDLActivity:</p>
  
  <pre><code>public class SDLActivity extends Activity {
      protected void onCreate(Bundle savedInstanceState) {
          //Log.v("SDL", "onCreate()");
          super.onCreate(savedInstanceState);
  
          // So we can call stuff from static callbacks
          mSingleton = this;
  
          // Set up the surface
          mEGLSurface = EGL10.EGL_NO_SURFACE;
          mSurface = new SDLSurface(getApplication());
          mEGLContext = EGL10.EGL_NO_CONTEXT;
  
  
          mLayout = (LinearLayout)findViewById(R.id.sdl_view);
          //mLayout = new AbsoluteLayout(this);
          mLayout.addView(mSurface);
  
          setContentView(mLayout);
  
          android.view.ViewGroup.LayoutParams lp = mSurface.getLayoutParams();
          lp.height = 300;
          // Commit the layout parameters
          mSurface.setLayoutParams(lp);
  
      }
  ...
  }
  </code></pre>
  
  <p>My problem is that I have half of the screen filled with the surface, and the other one white. So, actually, I can't see the TextView I have in the layout.</p>
  
  <p>How can I fix this?</p>