0

In my android app, I am playing a youtube video using WebView with IFrame. When the activity-UI is in portrait mode and I click on the youtube video at the bottom right corner to make it full screen, it appears to have have become full screen for a second. But then it switches back to original size quickly and the activity-UI goes into landscape mode.

Balkrishna Rawool
  • 1,865
  • 3
  • 21
  • 35
  • if possible then set SetRequestedOrientation to Portrait when you start playing video. – ρяσѕρєя K Mar 31 '12 at 23:35
  • @imrankhan thanks for the comment. Indeed I needed to do that. But the problem was still there. Then I found solution on another stack-overflow question. I also had to put `android:configChanges="orientation"` in AndroidManifest file for that activity. – Balkrishna Rawool Mar 31 '12 at 23:45
  • I found the solution on another stack-overflow question: [link](http://stackoverflow.com/questions/1111980/how-to-handle-screen-orientation-change-when-progress-dialog-and-background-thre) I had to do this: `android:configChanges="orientation"` in my AndroidManifest file for that activity. The problem is when orientation changes, the activity is destroyed and setting this doesn't destroy the activity it only invokes the `onConfigurationChanged(Configuration)` method. – Balkrishna Rawool Mar 31 '12 at 23:49

1 Answers1

0

I found the solution on another stack-overflow question: link I had to do this: android:configChanges="orientation" in my AndroidManifest file for that activity. The problem is when orientation changes, the activity is destroyed and setting this doesn't destroy the activity it only invokes the onConfigurationChanged(Configuration) method.

Community
  • 1
  • 1
Balkrishna Rawool
  • 1,865
  • 3
  • 21
  • 35