Android:按下广告会导致锁定方向的 Activity 改变方向
我的应用程序中的所有活动都使用以下方式锁定为纵向:
android:screenOrientation="portrait"
我在一些活动的顶部显示广告,如果我向侧面倾斜手机并按下广告,它会将底层活动更改为横向!我尝试
onConfigurationChanged(Configuration newConfig)
通过将配置设置为纵向并调用超级来覆盖,但没有效果。有关如何解决此问题或发生了什么事的任何线索?
All of the Activities in my app are locked into portrait orientation using:
android:screenOrientation="portrait"
I have ads showing at the top of a few of my Activities, and if I tilt the phone sideways and press the ad, it changes the underlying Activity into landscape orientation! I tried to override
onConfigurationChanged(Configuration newConfig)
by setting the configuration to portrait and calling through to super, but it has no effect. Any clue on how to fix this, or what's going on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
成功了。
Did the trick.