Shreyash Mahajan
Shreyash Mahajan

Reputation: 23596

Android :How to stretch video in android device with the device height-width?

In my app, I am going to display the Video. But the video height and width is smaller then then device Screen height width. So what should i have to do if i want to stretch the Video height and width that set to device height and width.

I am using VideoView to load video. And i have set its property as fill_parent for both height and width. but even doing that i am not able to get stretch video to the device height and Width.

main.xml

<RelativeLayout
        android:id="@+id/playingRelativeLayout" 
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1"
        android:background="#FFFFFF">
        <VideoView
            android:id="@+id/myVideoView"
            android:layout_height="fill_parent"
            android:layout_width="fill_parent"
            android:layout_centerInParent="true"
            android:fitsSystemWindows="true"
            />

So please help me for that.

Thanks.

Upvotes: 1

Views: 2562

Answers (1)

jtt
jtt

Reputation: 13541

Android does not support the resizing of videos, you may want to look into a Third Party library that you can utilize. By default android does not have this, If I recall correctly.

Upvotes: 1

Related Questions