I have a video in one size and would like from it to display full size all the time no matter the size of the screen. At the same time I would like to keep aspect ratio of that video so it doesn't stretch i create a bad look.
I can accomplish that stretch effect like this but the video looks bad then:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<VideoView android:id="@+id/videoViewRelative"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</VideoView>
</RelativeLayout>
In my this case it is not important to show whole video to user so I need something like how it's done for ImageView:
android:scaleType="centerCrop"
Is there any crop alternative for VideoView
? Thank you :)
You can try to use this library
https://github.com/dmytrodanylyk/video-crop
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With