我有一个视频,想要让它在任何屏幕大小下都能以全尺寸显示。同时,我希望保持视频的宽高比,以免拉伸导致不美观。
我可以通过拉伸来实现全尺寸显示,但这样会使视频显得很糟糕。
在我的情况下,向用户展示整个视频并不重要,因此我需要像ImageView一样的东西:
有没有适用于
我可以通过拉伸来实现全尺寸显示,但这样会使视频显得很糟糕。
<?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>
在我的情况下,向用户展示整个视频并不重要,因此我需要像ImageView一样的东西:
android:scaleType="centerCrop"
有没有适用于
VideoView
的任何作物替代品?谢谢 :)