-1

I am confused difference between photoshop "PX" and android "DP" ?how to sync between these values.?

Rajkumar
  • 227
  • 3
  • 13
  • http://developer.android.com/guide/practices/screens_support.html. check the topic under Density-independent pixel (dp) – Raghunandan May 23 '13 at 07:33

1 Answers1

3

px Pixels - corresponds to actual pixels on the screen.

dp Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion. Note: The compiler accepts both "dip" and "dp", though "dp" is more consistent with "sp".

x is one pixel. scale-independent pixels ( sp ) and density-independent pixels ( dip ) you want to use sp for font sizes and dip for everything else.

dip==dp
Jatinkumar Patel
  • 1,693
  • 2
  • 15
  • 35