title: VideoView onPrepared is not called if the VideoView is invisible
body: <p>I am hiding the <code>VideoView</code> initially and when the video is loaded I am showing the <code>VideoView</code>. But <code>onPrepared</code> is never called if the <code>VideoView</code> is <code>invisible</code> initially. However <code>onPrepared</code> is called properly if <code>VideoView</code> is visible. Is there any way to hide the <code>videoView</code> until video is loaded. Any help would be appreciated. Thanks!</p>
  
  <p>activity_main.xml</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="match_parent" &gt;
  
  
  &lt;VideoView
          android:id="@+id/video"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_alignParentBottom="true"
          android:layout_alignParentLeft="true"
          android:layout_alignParentRight="true"
          android:layout_alignParentTop="true"
          android:visibility="invisible" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>MainActivity.java</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          VideoView videoView = (VideoView) findViewById(R.id.video);
          Uri videoUri = Uri.parse(url);
          videoView.setVideoURI(videoUri);
          videoView.requestFocus();
  
          videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
  
              @Override
              public void onPrepared(MediaPlayer mp) {
                  Toast.makeText(mActivity, "on prepared", Toast.LENGTH_SHORT).show();
  
  
                   videoView.setVisibility(View.VISIBLE);
  
  
              }
          });
  
  
  }
  </code></pre>