Created
April 22, 2013 12:01
-
-
Save jfsurban/5434434 to your computer and use it in GitHub Desktop.
convert dip to pixels (http://stackoverflow.com/a/8399445)
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
int dipValue = 200; // we whant to convert this dip value to pix | |
Resources r = getResources(); | |
float pix = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dipValue, r.getDisplayMetrics()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment