Android Fixed size dialog dimension- What is Major & Minor?

南楼画角 提交于 2019-12-21 03:24:16

问题


What are these attributes stands for? The difference between major dimension and minor dimension?

<style name="Theme.Base.AppCompat.Dialog.FixedSize" parent="android:Theme.Dialog">
    <item name="windowFixedWidthMajor">@dimen/dialog_fixed_width_major</item>
    <item name="windowFixedWidthMinor">@dimen/dialog_fixed_width_minor</item>
    <item name="windowFixedHeightMajor">@dimen/dialog_fixed_height_major</item>
    <item name="windowFixedHeightMinor">@dimen/dialog_fixed_height_minor</item>
.......
</style>

回答1:


windowFixedHeightMajor : A fixed height for the window along the major axis of the screen, that is, when in portrait.

windowFixedHeightMinor : A fixed height for the window along the minor axis of the screen, that is, when in landscape.

windowFixedWidthMajor : A fixed width for the window along the major axis of the screen, that is, when in landscape.

windowFixedWidthMinor : A fixed width for the window along the minor axis of the screen, that is, when in portrait.




回答2:


Using windowFixedHeightMajor or windowFixedHeightMinor do not compile as their marked private.



来源:https://stackoverflow.com/questions/29003591/android-fixed-size-dialog-dimension-what-is-major-minor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!