title: Scaling image on top of VideoView gets cropped
body: <p>I am trying my hands at Android App Development and facing some issues related to VideoView.
  I am using animator to scale my image. Code is as below:</p>
  
  <blockquote>
    <p>MainActivity.java</p>
  </blockquote>
  
  <pre><code>private MediaPlayer mediaPlayer;
  private SurfaceHolder vidHolder;
  private SurfaceView vidSurface;
  private VideoView videoView;
  String vidAddress = "https://archive.org/download/ksnn_compilation_master_the_internet/ksnn_compilation_master_the_internet_512kb.mp4";
  
  public void onCreate(Bundle savedInstanceState){
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      videoView = (VideoView) findViewById(R.id.VideoView);
      try {
          Uri videoURL = Uri.parse(vidAddress);
          videoView.setVideoURI(videoURL);
  
      } catch (Exception e) {
          Log.e("Error", e.getMessage());
          e.printStackTrace();
      }
  
      videoView.requestFocus();
      videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
          public void onPrepared(MediaPlayer mp) {
              videoView.start();
          }
      });
      ImageView imageView = (ImageView) findViewById(R.id.imageView);
      AnimatorSet set = (AnimatorSet) AnimatorInflater.loadAnimator(this, R.animator.image_anim);
      set.setTarget(imageView);
      set.start();
  }
  </code></pre>
  
  <blockquote>
    <p>activity_main.xml</p>
  </blockquote>
  
  <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:background="#000000"
      tools:context=".MainActivity" &gt;
  
      &lt;VideoView
          android:id="@+id/VideoView"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"/&gt;
  
  
      &lt;ImageView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/imageView"
          android:layout_centerVertical="true"
          android:layout_centerHorizontal="true"
          android:src="@raw/logo"
          android:visibility="visible"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <blockquote>
    <p>image_anim.xml</p>
  </blockquote>
  
  <pre><code>&lt;set xmlns:android="http://schemas.android.com/apk/res/android" android:ordering="together"&gt;
      &lt;objectAnimator
          android:propertyName="scaleX"
          android:duration="10000"
          android:valueFrom="1"
          android:startOffset="5000"
          android:valueTo="2"
          android:valueType="floatType"/&gt;
      &lt;objectAnimator
          android:propertyName="scaleY"
          android:duration="10000"
          android:valueFrom="1"
          android:startOffset="5000"
          android:valueTo="2"
          android:valueType="floatType"/&gt;
  &lt;/set&gt;
  </code></pre>
  
  <p>The image displays fine when activity is started. But as and when it scales, I cannot see the image beyond its original dimensions. In other words, it gets cropped on beyond the area of the original dimensions.</p>
  
  <p>I believe it is somewhat related to the following issue with VideoView but have no idea how to resolve it.</p>
  
  <p><a href="https://stackoverflow.com/a/22101290/3530685">https://stackoverflow.com/a/22101290/3530685</a></p>
  
  <p>For better understanding, this is what is happening
  <a href="https://i.stack.imgur.com/iRVn9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iRVn9.jpg" alt="Before Scaling"></a></p>
  
  <p><a href="https://i.stack.imgur.com/oLCs9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oLCs9.jpg" alt="After Scaling"></a></p>
  
  <p>Scaling happens fine if I remove VideoView. How can I do properly scale image without the image getting cropped due to VideoView?</p>
  
  <p>Edit: I tested it on another device with Android 5.1.1 and it works fine. But does not work fine in emulator or device with Android 4.0.4</p>