Package-level declarations

Types

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

EN Represents a custom dimension entry with qualifiers and priority. Used by the Scaled class to define specific values for screen conditions.

Link copied to clipboard

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

Properties

Link copied to clipboard
val Int.hdp: Dp

EN Extension for Dp with dynamic scaling based on the Screen Height (hDP). Usage example: 32.hdp.

Link copied to clipboard
val Int.sdp: Dp

EN Extension for Dp with dynamic scaling based on the Smallest Width (swDP). Usage example: 16.sdp.

Link copied to clipboard
val Int.wdp: Dp

EN Extension for Dp with dynamic scaling based on the Screen Width (wDP). Usage example: 100.wdp.

Functions

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

EN Maps the uiMode value from the configuration to the library's UiModeType enum.

Link copied to clipboard

EN Starts the build chain for the custom dimension Scaled from a base Dp. Usage example: 100.dp.scaled().screen(...).

EN Starts the build chain for the custom dimension Scaled from a base Int. Usage example: 100.scaled().screen(...).

Link copied to clipboard
fun Int.toDynamicScaledDp(qualifier: DpQualifier): Dp

EN Converts an Int (the base Dp value) into a dynamically scaled Dp. The logic tries to find a corresponding dimension resource in the 'res/values/' folder.