appdimens-dynamic

//AppDimens SDP, HDP, WDP: Scalable Width and Height Dimensions/com.appdimens.dynamic.compose/DimenScaled

DimenScaled

class DimenScaled(val initialBaseDp: ERROR CLASS: Symbol not found for Dp, val sortedCustomEntries: List<CustomDpEntry> = emptyList(), val ignoreMultiWindows: Boolean = false, val applyAspectRatio: Boolean = false, val customSensitivityK: Float? = null)

EN A Stable class that allows defining custom dimensions based on screen qualifiers (UiModeType, Width, Height, Smallest Width).

The Dp value is resolved at composition (Compose) and uses the base value or a custom value, applying dynamic scaling at the end.

PT Classe Stable que permite a definição de dimensões customizadas baseadas em qualificadores de tela (UiModeType, Largura, Altura, Smallest Width).

O valor Dp é resolvido na composição (Compose) e usa o valor base ou um valor customizado, aplicando o dimensionamento dinâmico no final.

private constructor(initialBaseDp: ERROR CLASS: Symbol not found for Dp, sortedCustomEntries: List<CustomDpEntry> = emptyList(), ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null)

private val applyAspectRatio: Boolean

private val customSensitivityK: Float?

val hdp: ERROR CLASS: Symbol not found for Dp

EN The final Dp value resolved in Compose (Screen Height). PT O valor final Dp resolvido no Compose (Altura da Tela).

val hdpPx: Float

EN The final Pixel (Float) value resolved in Compose (Screen Height). PT O valor final em Pixels (Float) resolvido no Compose (Altura da Tela).

private val ignoreMultiWindows: Boolean

private val initialBaseDp: ERROR CLASS: Symbol not found for Dp

val sdp: ERROR CLASS: Symbol not found for Dp

EN The final Dp value resolved in Compose (Smallest Width). PT O valor final Dp resolvido no Compose (Smallest Width).

val sdpPx: Float

EN The final Pixel (Float) value resolved in Compose (Smallest Width). PT O valor final em Pixels (Float) resolvido no Compose (Smallest Width).

private val sortedCustomEntries: List<CustomDpEntry>

val wdp: ERROR CLASS: Symbol not found for Dp

EN The final Dp value resolved in Compose (Screen Width). PT O valor final Dp resolvido no Compose (Largura da Tela).

val wdpPx: Float

EN The final Pixel (Float) value resolved in Compose (Screen Width). PT O valor final em Pixels (Float) resolvido no Compose (Largura da Tela).

fun aspectRatio(enable: Boolean = true, sensitivityK: Float? = null): DimenScaled

EN Allow applying aspect ratio based constraint scaling. PT Permite aplicar o redimensionamento baseado na proporção da tela.

fun ignoreMultiWindows(ignore: Boolean = true): DimenScaled

EN Allow ignoring the constraint scaling based on multi-window resizing properties. PT Permite ignorar o dimensionamento para os layouts de múltiplas janelas (divisão de tela).

private fun reorderEntries(newEntry: CustomDpEntry): List<CustomDpEntry>

EN Adds a new entry and re-sorts the list. Sorting is crucial: first by priority (ascending), and then by dpQualifierEntry.value (descending) so that larger qualifiers (e.g., sw600dp) are checked before smaller qualifiers (e.g., sw320dp).

private fun resolve(qualifier: DpQualifier): ERROR CLASS: Symbol not found for Dp

EN Resolves the final dimension. This is the Composable part that reads the current configuration and decides which Dp to use.

private fun resolvePx(qualifier: DpQualifier): Float

fun screen(orientation: Orientation = Orientation.DEFAULT, customValue: ERROR CLASS: Symbol not found for Dp, finalQualifierResolver: DpQualifier? = null, inverter: Inverter? = Inverter.DEFAULT): DimenScaled

EN Priority 4: Orientation. This is an overload that accepts an Int for customValue.

EN Priority 2: UiModeType qualifier (e.g., TELEVISION, WATCH).

EN Priority 2: UiModeType qualifier (e.g., TELEVISION, WATCH). This is an overload that accepts an Int for customValue.

EN Priority 3: Dp qualifier (sw, h, w) without UiModeType restriction.

EN Priority 3: Dp qualifier (sw, h, w) without UiModeType restriction. This is an overload that accepts an Int for customValue.

EN Priority 1: Most specific qualifier - Combines UiModeType AND Dp Qualifier (sw, h, w).

EN Priority 1: Most specific qualifier - Combines UiModeType AND Dp Qualifier (sw, h, w). This is an overload that accepts an Int for customValue.

Constructors

Name Summary
DimenScaled  

Properties

Name Summary
applyAspectRatio  
customSensitivityK  
hdp  
hdpPx  
ignoreMultiWindows  
initialBaseDp  
sdp  
sdpPx  
sortedCustomEntries  
wdp  
wdpPx  

Functions

Name Summary
aspectRatio  
ignoreMultiWindows  
reorderEntries  
resolve  
resolvePx  
screen