我使用此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>
嘗試[該解決方案(http://stackoverflow.com/questions/8293909/surfaceview-height-width-gets-ignored/20798009#20798009)希望工程妳。 使佈局作爲andro說,但與填充父母,而不是包裝內容。 –