API
16lz
2021-01-26
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 的一个方向常量 |
更多相关文章
- Android(安卓)射击类游戏 (一)
- TableLayout布局表格列按比例切分屏幕
- Android的传感器编程小结
- 笔记:安卓改变app名字和定位显示时间间隔的问题
- Android仿IOS阻尼效果,上下弹性滑动,改变背景颜色
- Android(安卓)屏幕窗口Log日志调试库 LogcatViewer
- Android(安卓)适配不同屏幕(手机,平板)
- android UI适配
- Android屏幕密度与UI大小显示