Created
April 6, 2015 21:58
-
-
Save mandhor/e89d2547eaad7b9ab82b to your computer and use it in GitHub Desktop.
Convert DP to PX ( android dip dp pixels px )
This file contains 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
int dp = 123; | |
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, getResources().getDisplayMetrics()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment