//AppDimens SDP, HDP, WDP: Scalable Width and Height Dimensions/com.appdimens.dynamic.compose.perimeter/PerimeterSp
class PerimeterSp(val initialBaseValue: Number, val defaultFontScale: Boolean = true, val sortedCustomEntries: List<CustomSpEntry> = emptyList(), val ignoreMultiWindows: Boolean = false, val applyAspectRatio: Boolean = false, val customSensitivityK: Float? = null)
EN A Stable Compose class that allows defining custom Sp text dimensions based on screen qualifiers (UiModeType, Width, Height, Smallest Width).
The TextUnit is resolved at composition and uses the base value or a custom value, applying dynamic scaling via the existing XML DP resources.
PT Classe Stable do Compose que permite definir dimensões de texto Sp customizadas baseadas em qualificadores de tela (UiModeType, Largura, Altura, Smallest Width).
O TextUnit é resolvido na composição e usa o valor base ou um valor customizado, aplicando o escalonamento dinâmico via os recursos XML de DP existentes.
private constructor(initialBaseValue: Number, defaultFontScale: Boolean = true, sortedCustomEntries: List<CustomSpEntry> = emptyList(), ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null)
private val applyAspectRatio: Boolean
private val customSensitivityK: Float?
private val defaultFontScale: Boolean
private val ignoreMultiWindows: Boolean
private val initialBaseValue: Number
val prhem: ERROR CLASS: Symbol not found for TextUnit
EN The final TextUnit (Sp) value resolved using Screen Height (WITHOUT FONT SCALE). PT O valor final TextUnit (Sp) resolvido usando Altura da Tela (SEM ESCALA DE FONTE).
EN The final Pixel (Float) value resolved using Screen Height (WITHOUT FONT SCALE). PT O valor final em Pixels (Float) resolvido usando Altura da Tela (SEM ESCALA DE FONTE).
val prhsp: ERROR CLASS: Symbol not found for TextUnit
EN The final TextUnit (Sp) value resolved using Screen Height (WITH font scale). PT O valor final TextUnit (Sp) resolvido usando Altura da Tela (COM escala de fonte).
EN The final Pixel (Float) value resolved using Screen Height (WITH font scale). PT O valor final em Pixels (Float) resolvido usando Altura da Tela (COM escala de fonte).
val prsem: ERROR CLASS: Symbol not found for TextUnit
EN The final TextUnit (Sp) value resolved using Smallest Width (WITHOUT FONT SCALE). PT O valor final TextUnit (Sp) resolvido usando Smallest Width (SEM ESCALA DE FONTE).
EN The final Pixel (Float) value resolved using Smallest Width (WITHOUT FONT SCALE). PT O valor final em Pixels (Float) resolvido usando Smallest Width (SEM ESCALA DE FONTE).
val prssp: ERROR CLASS: Symbol not found for TextUnit
EN The final TextUnit (Sp) value resolved using Smallest Width (WITH font scale). PT O valor final TextUnit (Sp) resolvido usando Smallest Width (COM escala de fonte).
EN The final Pixel (Float) value resolved using Smallest Width (WITH font scale). PT O valor final em Pixels (Float) resolvido usando Smallest Width (COM escala de fonte).
val prwem: ERROR CLASS: Symbol not found for TextUnit
EN The final TextUnit (Sp) value resolved using Screen Width (WITHOUT FONT SCALE). PT O valor final TextUnit (Sp) resolvido usando Largura da Tela (SEM ESCALA DE FONTE).
EN The final Pixel (Float) value resolved using Screen Width (WITHOUT FONT SCALE). PT O valor final em Pixels (Float) resolvido usando Largura da Tela (SEM ESCALA DE FONTE).
val prwsp: ERROR CLASS: Symbol not found for TextUnit
EN The final TextUnit (Sp) value resolved using Screen Width (WITH font scale). PT O valor final TextUnit (Sp) resolvido usando Largura da Tela (COM escala de fonte).
EN The final Pixel (Float) value resolved using Screen Width (WITH font scale). PT O valor final em Pixels (Float) resolvido usando Largura da Tela (COM escala de fonte).
private val sortedCustomEntries: List<CustomSpEntry>
fun aspectRatio(enable: Boolean = true, sensitivityK: Float? = null): PerimeterSp
EN Allow applying aspect ratio based constraint scaling. PT Permite aplicar o redimensionamento baseado na proporção da tela.
fun ignoreMultiWindows(ignore: Boolean = true): PerimeterSp
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: CustomSpEntry): List<CustomSpEntry>
EN Adds a new entry and re-sorts the list by priority, then by qualifier value (descending).
private fun resolve(qualifier: DpQualifier): ERROR CLASS: Symbol not found for TextUnit
EN Resolves the matching CustomSpEntry and returns scaled TextUnit (Sp) for qualifier. PT Resolve a CustomSpEntry correspondente e retorna TextUnit (Sp) escalonado para qualifier.
private fun resolveNoFontScale(qualifier: DpQualifier): ERROR CLASS: Symbol not found for TextUnit
EN Like resolve but forces fontScale = false (fixed Sp, same idea as prsem / prwem accessors). PT Como resolve, mas força fontScale = false (Sp fixo, mesmo propósito dos acessores prsem / prwem).
private fun resolveNoFontScalePx(qualifier: DpQualifier): Float
EN Like resolvePx with fontScale = false. PT Como resolvePx com fontScale = false.
private fun resolvePx(qualifier: DpQualifier): Float
EN Same as resolve but returns density-scaled pixels (toDynamicPerimeterPx). PT Igual a resolve, mas retorna pixels já escalados pela densidade (toDynamicPerimeterPx).
fun screen(orientation: Orientation = Orientation.DEFAULT, customValue: Number, finalQualifierResolver: DpQualifier? = null, inverter: Inverter = Inverter.DEFAULT, fontScale: Boolean = defaultFontScale): PerimeterSp
EN Priority 4: Orientation only. PT Prioridade 4: Apenas Orientação.
EN Priority 2: UiModeType qualifier (e.g., TELEVISION, WATCH). PT Prioridade 2: Qualificador de UiModeType (e.g., TELEVISION, WATCH).
EN Priority 3: Dp qualifier (sw, h, w) without UiModeType restriction. PT Prioridade 3: Qualificador de Dp (sw, h, w) sem restrição de UiModeType.
EN Priority 1: Most specific qualifier - Combines UiModeType AND Dp Qualifier (sw, h, w). PT Prioridade 1: Qualificador mais específico - Combina UiModeType E Qualificador de Dp (sw, h, w).
| Name | Summary |
|---|---|
| PerimeterSp |
| Name | Summary |
|---|---|
| aspectRatio | |
| ignoreMultiWindows | |
| reorderEntries | |
| resolve | |
| resolveNoFontScale | |
| resolveNoFontScalePx | |
| resolvePx | |
| screen |