Android Pixel Calculator

SimpleAdvanced

dp

Density-independent Pixels

sp

Scale-independent Pixels

 


Check relation between the dp, px, sp, in, mm and pt measurement units and convert to other unit.

 in
@

Android doesn't do direct pixel mapping, it uses Density Independent Pixel (dpi) values to scales the actual screen size

to calculate pixel density - getResources().getDisplayMetrics().density;

px

Pixels

mm

Millimeters

pt

Points

in

Inches

Android Pixel Calculator

Screen density is area of pixel quantity or total count of pixels in the vertical and horizontal directions. This pixel area measurement is referred to as dpi(dots per inch). In Android, densities categorized in 6 types:

ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi

The ratio between dpi measurement are following
ldpimdpihdpixhdpixxhdpixxxhdpi

There are other measurement units require for handling like images, graph, layout etc for android app development. In this tool you can compare measurement unit among different measurement unit values


comments powered by Disqus