AppDimensDynamic

class AppDimensDynamic(initialBaseDp: Dp, ignoreMultiViewAdjustment: Boolean = false)

EN A builder class for creating dynamic dimensions that allow base Dp customization via screen qualifiers (.screen()). The final value is scaled by the screen size.

PT Uma classe construtora para criar dimensões dinâmicas que permitem a customização do Dp base por meio de qualificadores de tela (.screen()). O valor final é escalado pelo tamanho da tela.

Constructors

Link copied to clipboard
constructor(initialBaseDp: Dp, ignoreMultiViewAdjustment: Boolean = false)

Properties

Link copied to clipboard
val dp: Dp

EN Builds the adjusted Dp from the calculation.

Link copied to clipboard

EN Builds the adjusted TextUnit (Sp) from the calculation (NO FONT SCALE).

Link copied to clipboard

EN Builds the adjusted Pixel value (Float) from the calculation.

Link copied to clipboard

EN Builds the adjusted TextUnit (Sp) from the calculation.

Functions

Link copied to clipboard

EN Ignores multi-view adjustment if set to true.

Link copied to clipboard
fun screen(type: UiModeType, customValue: Dp): AppDimensDynamic

EN Sets a custom dimension for a specific UI mode.

fun screen(type: UiModeType, customValue: TextUnit): AppDimensDynamic

EN Overload for screen that accepts a TextUnit value.

fun screen(type: UiModeType, customValue: Float): AppDimensDynamic

EN Overload for screen that accepts a Float value.

fun screen(type: UiModeType, customValue: Int): AppDimensDynamic

EN Overload for screen that accepts an Int value.

fun screen(type: DpQualifier, value: Int, customValue: TextUnit): AppDimensDynamic

EN Overload for screen that accepts a TextUnit value for a DpQualifier.

fun screen(type: DpQualifier, value: Int, customValue: Float): AppDimensDynamic

EN Overload for screen that accepts a Float value for a DpQualifier.

fun screen(type: DpQualifier, value: Int, customValue: Int): AppDimensDynamic

EN Sets a custom dimension for a specific screen qualifier.

fun screen(uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Int, customValue: Dp): AppDimensDynamic

EN Sets a custom dimension for a specific intersection of UI mode and screen qualifier.

fun screen(uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Int, customValue: TextUnit): AppDimensDynamic

EN Overload for screen intersection that accepts a TextUnit value.

fun screen(uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Int, customValue: Float): AppDimensDynamic

EN Overload for screen intersection that accepts a Float value.

fun screen(uiModeType: UiModeType, qualifierType: DpQualifier, qualifierValue: Int, customValue: Int): AppDimensDynamic

EN Overload for screen intersection that accepts an Int value.

Link copied to clipboard
fun type(type: ScreenType): AppDimensDynamic

EN Sets the screen dimension type to be used as a reference (HIGHEST or LOWEST).