我在我的活动中使用这个XML布局来显示全屏VideoView。视频是全屏的,但不是居中的。在横屏模式下,它停留在屏幕左侧,右侧留下一些空白区域。
如何让我的VideoView位于屏幕中央?
如何让我的VideoView位于屏幕中央?
<?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/myvideoview"
android:layout_width="fill_parent"
android:layout_alignParentRight="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_height="fill_parent">
</VideoView>
</RelativeLayout>