YouTube video full screen mode switches activity-UI into landscape mode

冷暖自知 提交于 2019-12-25 05:43:09

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/9960582/youtube-video-full-screen-mode-switches-activity-ui-into-landscape-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!