Search code examples
androidpixeldpi

Android One line of pixels


If I created one line of pixels for android, will it always be one line of pixels across all the android devices? Because android has lots of different devices with screen sizes, dpi, etc.

Or will I have to use OpenGL?


Solution

  • Where are you setting this size? In xml, a dimension of 1px will always mean one pixel, while using 1dp will change based on screen density. See this answer.