安卓制定活动取向code [英] android setting activity orientation by code
本文介绍了安卓制定活动取向code的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
,可以设置一个活动的方向在清单文件
但它也可以从code做呢?如果是的话,怎么办?
谢谢!
解决方案
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
it is possible to set the orientation of an activity in the manifest file.
but is it also possible to do it from code? if so, how?
thanks!
解决方案
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
这篇关于安卓制定活动取向code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文