I use this XML layout to show a full-screen VideoView in my activity. The video is fullscreen, but it is not centered. In landscape mode, it remains on the left side of the screen and leaves a few spaces on the right side of the screen.
How can I make my VideoView set to the center of the screen?
<?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>
source share