Last active
August 29, 2015 14:11
-
-
Save omegasoft7/a4c76042481bbf0d9ce1 to your computer and use it in GitHub Desktop.
Calculate Pixcels by getting DP
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
// this will calculate and return Pixel value by getting DP value | |
public static int getDPbyPixcel(int pix) { | |
return (int) (pix * HYGlobal.density + 0.5f); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment