Skip to content

Dimensions

Android dp extensions for View and Context. Particularly handy when using Views DSL.

dip and dp extension functions on View and Context take an Int parameter and return the value in Android’s dp. The former (dip) returns an Int while the latter (dp) returns a Float.

Examples

val minTapTargetSize = dip(48)
val circleDiameter = dp(48)

Download

implementation "com.louiscad.splitties:splitties-dimensions:2.1.1"