繁体   English   中英

Android:“方向”和“屏幕布局”之间有什么区别?

[英]Android: What is a difference between 'orientation' and 'screenLayout'?

有2个具有相同描述的不同常量( https://developer.android.com/reference/android/R.attr.html#configChanges

orientation  0x0080  The screen orientation has changed, that is the user has rotated the device. 
screenLayout  0x0100  The screen orientation has changed, that is the user has rotated the device.

许多资料建议指定:

android:configChanges="keyboardHidden|orientation"

但不应该是:

android:configChanges="keyboardHidden|orientation|screenLayout"

我从未见过screenLayout使用这种方式。 我猜这是文档中的复制粘贴错误。

现在已在文档中修复:

方向0x0080屏幕方向已更改,即用户已旋转设备。

screenLayout 0x0100屏幕布局已更改。 这可能是由于激活了其他显示器引起的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM