java - Full screen Videoview doesn't hide menu bar during rotation -


I am working on the YouTube / RTMP live video app, which uses video and sample code from the entire network. The app is working but I'm facing a problem when I change the orientation, rotates and grows live video, but it does not go to full screen, I only go to full screen only How to setup when i Go into landscape mode

Its main activity

  progressdialog = ProgressDialog.show (It, "", "CARGANDO vÃdeo por favor espere ...", true) ?. progressdialog.setCancelable (true); Last Video View vidView = (Watch Video) VVBIID (R.Did.VideoView); String vidAddress = "http: //videourl/playlist.m3u8"; Uri Vidururi = Uri Parse (vdress); vidView.setVideoURI (vidUri); MediaController vidControl = New MediaController (this); VidControl.setAnchorView (vidView); VidView.setMediaController (vidControl); vidView.setOnPreparedListener (New OnPreparedListener () {public void onPrepared (MediaPlayer arg0) {progressdialog.dismiss (); vidView.start ();}});   

Main XML

  & lt; RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: device = "http://schemas.android.com/tools" android: layout_width = "match_parent" Android: layout_height = "Match_parent" Android: background = "@color / white" & gt; & Lt; GridView android: id = "@ + id / list_playlist" Android: layout_width = "match_parent" Android: layout_height = "match_parent" Android: layout_alignParentBottom = "true" Android: layout_alignParentRight = "true" Android: layout_below = "@ + id / video_view "Android: layout_margin =" 5sp "Android: gravity =" center "Android: numColumns =" ​​2 "Android: scrollbars =" none "& gt; & Lt; / GridView & gt; & Lt; RelativeLayout android: id = "@ + id / layout_ad" Android: layout_width = "match_parent" Android: layout_height = "50sp" Android: layout_alignParentBottom = "true" android: gravity = "center_horizontal" & gt; & Lt; / RelativeLayout & gt; & Lt; VideoView android: id = "@ + id / video_view" Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: layout_alignParentLeft = "true" Android: layout_alignParentRight = "true" Android: layout_alignParentTop = "true" / & gt ;   

vertical  horizontal

Your orientation change in the event or whatever video is found on the fullscreen , you hide Hide status / strong> and the action bar . This way, when you change the orientation, the status bar and the action bar will be hidden so that the video has to go to fullscreen.

How to hide the status bar:

1

How to hide



Comments

Popular posts from this blog

Python Equivalent for matlab cart2pol and pol2cart -

Docker - Tomcat and PostgreSQL containers in same host - No Route to host -

java - Joda Time Interval Not returning what I expect -