Package-level declarations

Types

Link copied to clipboard
data class CustomSpEntry(val uiModeType: UiModeType? = null, val dpQualifierEntry: DpQualifierEntry? = null, val customValue: TextUnit, val priority: Int)

EN Represents a custom text dimension (Sp) configuration entry. Used to define specific text (Sp) values based on the UI mode (e.g., car, TV), DP qualifier (e.g., smallest width), and priority.

Link copied to clipboard

EN The main class for applying dynamic text scaling (Sp) with conditional logic. Allows defining specific Sp values for different screen configurations (UI mode, smallest width, height, width).

Properties

Link copied to clipboard

EN Composable extension for Int that returns a dynamically scaled TextUnit (Sp) (WITHOUT FONT SCALE) using the Height qualifier. Useful for text scaling based on the screen height (h).

Link copied to clipboard

EN Composable extension for Int that returns a dynamically scaled TextUnit (Sp) using the Height qualifier. Useful for text scaling based on the screen height (h).

Link copied to clipboard

EN Composable extension for Int that returns a dynamically scaled TextUnit (Sp) (WITHOUT FONT SCALE) using the Smallest Width qualifier. Useful for text scaling based on the most limiting dimension (sw).

Link copied to clipboard

EN Composable extension for Int that returns a dynamically scaled TextUnit (Sp) using the Smallest Width qualifier. Useful for text scaling based on the most limiting dimension (sw).

Link copied to clipboard

EN Composable extension for Int that returns a dynamically scaled TextUnit (Sp) (WITHOUT FONT SCALE) using the Width qualifier. Useful for text scaling based on the screen width (w).

Link copied to clipboard

EN Composable extension for Int that returns a dynamically scaled TextUnit (Sp) using the Width qualifier. Useful for text scaling based on the screen width (w).

Functions

Link copied to clipboard
fun fromConfiguration(uiMode: Int): UiModeType

EN Maps the UI mode mask from the Android Configuration to the UiModeType enum.

Link copied to clipboard

EN Starts the Scaled build chain from a TextUnit.

EN Starts the Scaled build chain from an Int (converted to Sp).

Link copied to clipboard
fun Int.toDynamicScaledSp(qualifier: DpQualifier, fontScale: Boolean): TextUnit

EN The main logic for applying dynamic scaling. Tries to find a pre-calculated dimension resource (e.g., _16sdp) and uses it to get a scaled Sp value.