Nizam
Nizam

Reputation: 5731

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

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>

Upvotes: 19

Views: 5495

Answers (2)

Kitesurfer
Kitesurfer

Reputation: 3559

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

Upvotes: 3

Fahim
Fahim

Reputation: 12378

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.

Upvotes: 26

Related Questions