开发者

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

There are 2 different constants that have same description (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. 
screenLayo开发者_运维技巧ut  0x0100  The screen orientation has changed, that is the user has rotated the device.

Many sources suggest to specify:

android:configChanges="keyboardHidden|orientation"

But should not it be:

android:configChanges="keyboardHidden|orientation|screenLayout"


I have never seen screenLayout used that way. My guess that it is a copy-and-paste error in the documentation.


It is now fixed in the docs:

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

screenLayout 0x0100 The screen layout has changed. This might be caused by a different display being activated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜