开发者

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

开发者 https://www.devze.com 2022-12-28 21:31 出处:网络
There are 2 different constants that have same description (https://developer.android.com/reference/android/R.attr.html#configChanges)

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

精彩评论

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