Created
November 28, 2018 01:31
-
-
Save mgdiez/95236578e1bfe6c225f2cd46e1ee8fd4 to your computer and use it in GitHub Desktop.
DP Extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val Int.dp: Int | |
get() = (this * Resources.getSystem().displayMetrics.density).toInt() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment