Converting DIP / DP to pixels in Android

float sizeInDip = 10f; int padding = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, sizeInDip, getResources().getDisplayMetrics());
Converting DIP / DP to pixels in Android.

#android #snippet #dip #dp #pixel #pixels

#cesarnog.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.