0

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?

Konrad Krakowiak
  • 12,285
  • 11
  • 58
  • 45
  • 2
    I'm sorry but this question is too broad as it is asked. Please try to be more specific and include some code that demonstrates what you're trying to achieve. – Jason D Nov 06 '15 at 17:50

2 Answers2

2

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.

Community
  • 1
  • 1
RussHWolf
  • 3,555
  • 1
  • 19
  • 26
1

Take a look at Paint.setStrokeWidth. By passing in 0, it will always draw a single pixel width.

Buddy
  • 10,874
  • 5
  • 41
  • 58