0

I got a videoView, that plays in landscape. When rotating the device I want to switch to full screen. Just like youtube does.

In my solution when going to landscape I start new activity in full screen mode and trying to continue playing from where I stopped.

The problem is that it takes to long and there is a black screen for a moment. Do you have any suggestion how to improve this?

Ilya Gazman
  • 31,250
  • 24
  • 137
  • 216
  • You'll need to handle the configuration change (rotation) yourself, and replace the view hierarchy on the fly. Not trivial. But doable. – 323go Oct 22 '14 at 20:32
  • @323go you can't go to full screen after setContent been called. – Ilya Gazman Oct 22 '14 at 20:34
  • You're right, I assumed you already were immersive and just wanted to get rid of playback controls or such. I haven't tried it, but I wonder if you could launch another (minimal) activity in the configuration change callback... or have a simpler xml in landscape that loads faster. – 323go Oct 22 '14 at 20:39
  • @323go this is what I am doing now. But it slaw – Ilya Gazman Oct 22 '14 at 20:45
  • It is possible to go full screen after setContent: http://stackoverflow.com/a/9033359/3111870 – Shahzad Oct 22 '14 at 21:04
  • @Shahzad nop http://stackoverflow.com/questions/9023023/set-full-screen-out-oncreate/9033359#comment17938000_9033359 – Ilya Gazman Oct 22 '14 at 21:18

0 Answers0