Android - Playing MP4 in VideoView - no video but audio (Z-Order Doesn't Work)
<p>I'm trying to do a simple test playing an MP4 in a VideoView, but I can only hear audio. I've already tried the Z-order trick as suggested in other posts, but it didn't work.</p>

<p>TestLayout.axml:</p>

<pre><code>     &lt;?xml version="1.0" encoding="utf-8"?&gt;
        &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:id="@+id/testLayout"
            android:clipChildren="false"&gt;
                &lt;VideoView
                android:id="@+id/testVideo"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:visibility="visible"/&gt;
  &lt;LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:paddingLeft="10dp"
    android:paddingRight="20dp"
    android:paddingTop="170dp"
    android:paddingBottom="100dp"
    android:clipChildren="false"
    android:clipToPadding="false"&gt;
      &lt;ImageButton
        android:id="@+id/play"
        android:layout_height="20dp"
        android:layout_width="60dp"
        android:background="@android:color/transparent"
        android:adjustViewBounds="false"
        android:src="@drawable/play"
        android:scaleType="fitXY"
        android:padding="0dp"/&gt;
&lt;/LinearLayout&gt;
        &lt;/RelativeLayout&gt;
</code></pre>

<p>TestActivity.cs (button trigger code):</p>

<pre><code>    var videoView = (VideoView)FindViewById(Resource.Id.testVideo);
    videoView.SetVideoURI(Android.Net.Uri.Parse("android.resource://" + PackageName + "/" +Resource.Raw.testVideo));
    videoView.SetMediaController(null);
    videoView.RequestFocus();
    ISurfaceHolder holder = videoView.Holder;
    holder.SetType(SurfaceType.PushBuffers);
    videoView.Start();
    videoView.SetZOrderMediaOverlay(true);
    videoView.SetZOrderOnTop(true);
</code></pre>

<p>Any other suggestions?</p>

<p>MP4 is H.264 encoded using Photoshop and is 320x240.</p>