YouTube视频的全屏模式切换活动的用户界面为横向模式 [英] YouTube video full screen mode switches activity-UI into landscape mode

查看:1514
本文介绍了YouTube视频的全屏模式切换活动的用户界面为横向模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Andr​​oid应用程序,我在玩使用的WebView YouTube视频与的IFrame 。当活动的用户界面是在肖像模式和我在右下角点击YouTube视频,使其全屏幕,它似乎已经成为全屏幕一秒钟。但随后它迅速切换回原来的大小和活动的UI进入横向模式。

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.

推荐答案

我发现了另一个堆栈溢出问题的解决方案:<一href=\"http://stackoverflow.com/questions/1111980/how-to-handle-screen-orientation-change-when-progress-dialog-and-background-thre\">link我不得不这样做:的android:configChanges =在该活动我AndroidManifest文件方向。问题是,当方向的变化,该活动被破坏,设置此不破坏活动只调用 onConfigurationChanged(配置)方法。

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.

这篇关于YouTube视频的全屏模式切换活动的用户界面为横向模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆