Xamarin.Android Play Video in Fullscreen

PrasanthAsokkumarPrasanthAsokkumar USMember
edited October 2015 in Xamarin.Android

Android:
How can i set VideoView / MediaController in Fullscreen or is that even possible ?

iOS:
in iOS is that possible like this code.
this.moviePlayer.SetFullscreen(true, true);

Answers

  • RendyDelRosarioRendyDelRosario DOUniversity ✭✭✭

    You can set this on the .axml layout file. For example:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/RelativeLayout"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <VideoView
            android:id="@+id/SampleVideoView"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" />
    </LinearLayout>
    
  • YkshLeoYkshLeo USMember ✭✭✭✭
    edited October 2015

    Android :

    <VideoView android:id="@+id/videoView"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
    </VideoView>
    

    iOS :

        moviePlayer = new MPMoviePlayerController (NSUrl.FromFilename ("sample.m4v"));    
        View.AddSubview (moviePlayer.View);
        moviePlayer.SetFullscreen (true, true);
        moviePlayer.Play ();
    
  • It'll be not working for me, because i want set VideoView in Fullscreen if i Touched the screen. So i need to Set Video in Fullscreen in C#

  • YkshLeoYkshLeo USMember ✭✭✭✭
    edited October 2015

    @PrasanthAsokkumar

    I think you must go through some of the previous form post based on the similar topics.

    I think this can help you !

    https://forums.xamarin.com/discussion/comment/84627/

Sign In or Register to comment.