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 的一个方向常量

更多相关文章

  1. Android(安卓)射击类游戏 (一)
  2. TableLayout布局表格列按比例切分屏幕
  3. Android的传感器编程小结
  4. 笔记:安卓改变app名字和定位显示时间间隔的问题
  5. Android仿IOS阻尼效果,上下弹性滑动,改变背景颜色
  6. Android(安卓)屏幕窗口Log日志调试库 LogcatViewer
  7. Android(安卓)适配不同屏幕(手机,平板)
  8. android UI适配
  9. Android屏幕密度与UI大小显示

随机推荐

  1. RPC实战与核心原理
  2. 分布式数据库30讲
  3. CSS选择器优先级+模块化+伪类选择器
  4. 选择器的优先级,id,class,tag
  5. 十年软件测试感悟
  6. 2021春招 ,百度,阿里,美团等大厂全新PHP面试
  7. HTML中表格和表单的应用实例 (MD)
  8. CSS选择器优先级、模块化与伪类选择器的
  9. 学web前端有什么计划?
  10. NA公链(Nirvana)NAC公链独步公链江湖