Skip to main content


Showing posts with the label SP

Android Basic Tutorial : Android What Does DIP Stand For ?

What Does DIP Stand For?

DIP stands for Density Independent Pixels. Density Independent Pixels are also abbreviated as DP.

One Density Independent Pixel is defined as one pixel on a 160 DPI (dots per inch) screen.

Why Use DIPS? 

Perhaps you have seen in an example project or tutorial DIPs mentioned in Android projects. Since different phones can have different screen densities, you can not simply use pixels as a unit of measurement.

For example, if you wanted to draw an image that was 1 inch wide, and you specified the width as 160 pixels, on a 160 dpi screen the image would be 1 inch wide, but on a 320 dpi screen it would be half and inch.

However, if you specified the width of the image to be 160dip or dp (both abbreviations are acceptable in the Android SDK) then the Android System will automatically scale the image appropriately and it will look the same on both screens.

Scale-Independent Pixels (SP)

And to make things just a little more confusing, there are also Scale-Independent P…