API

来源:互联网 发布:sublime的python插件 编辑:程序博客网 时间:2024/06/17 02:34

void android.app.Activity.

setRequestedOrientation(int requestedOrientation)

Change the desired orientation of this activity. 
If the activity is currently in the foreground or otherwise impacting the screen orientation, the screen will immediately be changed (possibly causing the activity to be restarted). 
Otherwise, this will be used the next time the activity is visible.
改变正在使用的 Activity 的方向为所需要的(方向)。
如果 当前的在 foreground(前景) 的 Activity 或其他的方式 影响了屏幕方向,这屏幕(方向)会立即改变(可能导致(你的)活动的从新启动)
否则,这将使得下一次的活动可见。(不太理解)


Parameters:
requestedOrientation An orientation constant as used in ActivityInfo.screenOrientation.
参数:
requestedOrientation(请求的方向)  在 ActivityInfo.screenOrientation 的一个方向常量
0 0
原创粉丝点击