-4

I want to create graphics for Android apps but I can't find the screen dimensions in dp.

For example, I can see that the Galaxy has 720 x 1280 pixels. I see that it is also 4.8 inches.

Does this mean that the the dp is 720/4.8 = 150 dps?

What would this mean? That to make a shape fill the whole screen on this app I would set it to 150 dp? Strangely, when I make it a width of 150dp it fills barely half the screen.

CodyBugstein
  • 21,984
  • 61
  • 207
  • 363

1 Answers1

3

Does this mean that the the dp is 720/4.8 = 150 dps?

No. 4.8" is a diagonal measurement. 720 is a measurement along one axis.

Moreover, Android works on density buckets (e.g., -mdpi, -hdpi) more so than actual density, as there would be hundreds of different actual densities. This is doubly true when you take into account that pixels are not usually square, and so the density will be different on the X and Y axes.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491