title: VideoView android shows black screen for a second when setting visibility to gone
body: <p>I built a recyclerview with gridlayoutmanager. The goal is to display these imageviews as thumbnails and on click play the respective video behind it.
  Everything is working fine except the following scenario.</p>
  
  <p>1) When i click on an image, the image disappears(Visibility gone) and the video(Visibility visible) plays from the link, Now when i click on another video, the previous video disappears(Visibility gone  &lt;-- This causes a black screen for a moment at its position) and the previous image appears (Visibility visible) and now new image disappers, new video appears on its respective grid position and it plays. </p>
  
  <p>So it's like instagram search but with videos.</p>
  
  <p>Now when I dont do videoView.setVisibility(GONE), videoview stays behind the image which eventually makes scrolling lagging as no. of videos appear.</p>
  
  <p>Can any one help me figure out the issue ? I first make the image's visibility visible and then videoview disappear.</p>
  
  <p>Here's the layout code:</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="wrap_content"
  android:layout_height="wrap_content"
  android:id="@+id/cellLayout"
  android:animateLayoutChanges="true"&gt;
  
  &lt;VideoView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/videoView"
      android:layout_alignLeft="@+id/thumbnail"
      android:layout_alignRight="@+id/thumbnail"
      android:layout_alignTop="@+id/thumbnail"
      android:layout_alignBottom="@+id/thumbnail"
      android:visibility="gone"
  
      /&gt;
  &lt;ImageView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/thumbnail"
      android:adjustViewBounds="true"
      /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/Count"
      android:textColor="@color/colorAccent"
      android:gravity="center_horizontal|bottom"
      android:textStyle="bold"
      /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Edit: I also tried with another thread, but it's the same. 
  There was a flickerduring the start as well when i made the imageview disappear and videoview appear. However i used animateLayoutChanges= true. So it handled the starting flicker however it didn't work at the end.</p>