HeightSizeClass.Companion


public static class HeightSizeClass.Companion


Summary

Nested types

Public methods

static final @NonNull HeightSizeClass
compute(int dpHeight)

Returns a recommended HeightSizeClass for the height of a window given the height in DP.

static final @NonNull HeightSizeClass.Companion.HeightSizeClassEnum

Returns a HeightSizeClassEnum given the HeightSizeClass.

static final int

Returns a recommended height of a window in DP given the HeightSizeClass.

Public methods

compute

public static final @NonNull HeightSizeClass compute(int dpHeight)

Returns a recommended HeightSizeClass for the height of a window given the height in DP.

Parameters
int dpHeight

the height of the window in DP

Returns
@NonNull HeightSizeClass

A recommended size class for the height

Throws
kotlin.IllegalArgumentException

if the height is negative

getEnum

public static final @NonNull HeightSizeClass.Companion.HeightSizeClassEnum getEnum(@NonNull HeightSizeClass sizeClass)

Returns a HeightSizeClassEnum given the HeightSizeClass.

Parameters
@NonNull HeightSizeClass sizeClass

the size class

Returns
@NonNull HeightSizeClass.Companion.HeightSizeClassEnum

the relevant HeightSizeClassEnum

getHeightDpInSizeClass

public static final int getHeightDpInSizeClass(@NonNull HeightSizeClass sizeClass)

Returns a recommended height of a window in DP given the HeightSizeClass.

Parameters
@NonNull HeightSizeClass sizeClass

the size class

Returns
int

A recommended height in DP in this size class