Search code examples
androidandroid-layoutandroid-intentandroid-listviewvitamio

Android Vitamio Video FullScreen not Working


I have downloaded the Vitamio sample from here http://www.vitamio.org/en/Download/ and I'm successfully playing video on my Android Screen. But if I change my screen orientation, I'm unable to get FullScreen Mode.

Could anyone Help?

Layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <io.vov.vitamio.widget.CenterLayout
        android:layout_width="match_parent"
        android:layout_height="300dp"
         android:layout_marginTop="40dp"

        android:orientation="vertical" >

        <io.vov.vitamio.widget.VideoView
            android:id="@+id/surface_view"
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true" />
    </io.vov.vitamio.widget.CenterLayout>


    <FrameLayout
                android:id="@+id/mainlayout"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_marginLeft="1dp"
                android:orientation="vertical" >

                <ImageButton
                    android:id="@+id/playbtn"
                    android:layout_width="30dp"
                    android:layout_height="30dp"
                    android:layout_marginLeft="1dp"

                    android:background="@drawable/play" />

                <ImageButton
                    android:id="@+id/pausebtn"
                    android:layout_width="30dp"
                   android:layout_marginLeft="1dp"

                    android:layout_height="30dp"
                    android:background="@drawable/pause" />
                 <SeekBar
                android:id="@+id/seekBar1"
                android:layout_width="270dp"
                android:layout_height="wrap_content"
                android:layout_alignLeft="@+id/mainlayout"
                android:layout_marginLeft="40dp"
                android:layout_marginRight="1dp" />

            </FrameLayout>





</LinearLayout>

Solution

  • try this

    <io.vov.vitamio.widget.VideoView
        android:id="@+id/video"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true" 
    </io.vov.vitamio.widget.CenterLayout>