title: how to get width and height of videoview after video added
body: <p><strong>layout xml of videoview :</strong></p>
  
  <pre><code>   &lt;RelativeLayout
          android:id="@+id/videoEditorParent"
          android:layout_width="match_parent"
          android:layout_height="400dp"&gt;
  
          &lt;RelativeLayout
              android:id="@+id/vidEditorWrapper"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerInParent="true"
              android:background="@color/colorAccent"&gt;
  
              &lt;VideoView
                  android:id="@+id/vidEditor"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent" /&gt;
  
          &lt;/RelativeLayout&gt;
  
      &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>when i get height and width of video view it gives me match_parent's width and height, but not aspect ratio width and height of video is playing in videoview(whatever width and height is covered in videoview by video).</p>
  
  <p><strong>here, my code :</strong></p>
  
  <pre><code>            viewWidth = vidEditor.getWidth();
              viewHeight = vidEditor.getHeight();
  
              ViewGroup.LayoutParams layoutParams = vidEditorWrapper.getLayoutParams();
  
              dpWidthView = utilities.pxToDp(viewWidth);
              dpHeightView = utilities.pxToDp(viewHeight);
  
              dpWidthViewPerVal = (dpWidthView * 2) / 100;
  
              layoutParams.width = viewWidth;
              layoutParams.height = viewHeight;
              vidEditorWrapper.setLayoutParams(layoutParams);
  </code></pre>
  
  <p><strong>my screen shot :</strong></p>
  
  <p><a href="https://i.stack.imgur.com/DH1qE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DH1qE.png" alt="enter image description here"></a></p>
  
  <p>i want width and height of black area that is video playing in videoview.
  but getWidth() or getMeasuredWidth() and getHeight() or getMeasuredHeight() of videoview gives me match_parent width and height.</p>
  
  <p>so, <strong>how can i get width and height of video area</strong>(only dark area that is visible to us in picture not full width) that is covered in videoview.</p>