-4

I am working on a project in which I have to change the screen orientation to landscape as the video starts in onCreate() method and as soon as the video ends I have to again switch back to the portrait mode using two different layouts for different orientation without recreating the activity. I am using ExoPlayer for video play.

Thanks in advance!!

1 Answers1

1

Maybe you can use setRequestedOrientation-method of your activity:

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
Felix Gerber
  • 1,615
  • 3
  • 30
  • 40
Aldrin Joe Mathew
  • 472
  • 1
  • 4
  • 13