Stretch to fill VideoView, aspect ratio of VideoView
Try to make your outer layout a relative layout and put the VideoView inside that.
Something like:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/trim_container"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/buttonContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/go_back"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:onClick="onclick"
android:text="Try again" />
<Button
android:id="@+id/back_to_pick_song"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="Select another song"
android:onClick="onclick" />
<Button
android:id="@+id/btn_continue"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:onClick="onclick"
android:text="Amazing, continue!" />
</LinearLayout>
<VideoView
android:id="@+id/VideoView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_below="@id/buttonContainer"/>
</RelativeLayout>
Android Full Width in Video View
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<VideoView
android:id="@+id/videoView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:layout_centerVertical="true" />
</RelativeLayout>
Android-Video View in Fullscreen
when you click an menu item. you have to start a New Activity. for that Activity you have to set the theme attribute in the Manifest. set this value that is
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
thats it.
Related Topics
How to Specify the Jdk Version in Android Studio
How to Serialize Object to JSON
Retrofit and Rxjava: How to Combine Two Requests and Get Access to Both Results
How to Get Count of Number Methods Used in a Jar File
Why Is Exception.Printstacktrace() Considered Bad Practice
Convert Utc to Current Locale Time
Android.Content.Res.Resources$Notfoundexception
Fill Fields in Webview Automatically
Java - Convert String to Valid Uri Object
How to Get Current Location in Googlemap Using Fusedlocationproviderclient
Alertdialog with Custom View: Resize to Wrap the View's Content
Java.Io.Ioexception:No Authentication Challenges Found
Convert Object to JSON in Android