appdimens-dynamic

//AppDimens SDP, HDP, WDP: Scalable Width and Height Dimensions/com.appdimens.dynamic.code.auto/toDynamicAutoSpPx

toDynamicAutoSpPx

@JvmOverloadsfun Number.toDynamicAutoSpPx(context: Context, qualifier: DpQualifier, fontScale: Boolean = true, inverter: Inverter = Inverter.DEFAULT, ignoreMultiWindows: Boolean = false, applyAspectRatio: Boolean = false, customSensitivityK: Float? = null): Float

EN Converts an Int (the base Sp value) into a dynamically scaled pixel value (Float).

Sp→px uses scaledSp * density * fontScale when respecting font scale (equivalent to android.util.TypedValue.applyDimension for COMPLEX_UNIT_SP), else scaledSp * density for the fixed-Sp path. For many lookups, prefer DimenCache.getBatch; for early DataStore init, DimenAutoSp.warmupCache.

PT Converte um Int (o valor base de Sp) em um valor de pixel dinamicamente escalado (Float).

The scaled pixel value.

The Android context to access configuration and density.

The screen qualifier used for scaling (sw, h, w).

Whether to respect the system font scale.