Friday, March 23, 2012

How to play video in fullscreen in android?


ANDROID

How to play video in fullscreen in android?

Hello all……
Someone has been asking me how to play a video in android in fullscreen. Then I made some surfing in the internet and found a solution.
You can check out how to play a video in android here and to check whether the video has completed playing here.
The only change was to do in the xml.
This is the xml code of the layout containing the videoview.
?
Drag and copy the code
01
02
03
04
05
06
07
08
09
10
11
12
13
<?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>

No comments: