当设备倾斜如何$方位的对$ pvent变化? [英] How to prevent change of orientation when device is tilted?
本文介绍了当设备倾斜如何$方位的对$ pvent变化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何prevent活动从当设备倾斜,在新的方向了重绘?我想该活动已被证实后,的onCreate
函数不执行第二次。
How can I prevent the activity from redrawing in the new orientation out when the device is tilted? I want the onCreate
function to not execute a second time after the activity has been shown.
推荐答案
您可以修复屏幕方向。在您的清单文件添加到您的活动代码:
you can fix the screen orientation. Add this to your activity tag in your manifest file:
android:screenOrientation = "portrait"
这篇关于当设备倾斜如何$方位的对$ pvent变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文