0
votes

I am having trouble configuring my Android application for another screen density. Currently, my app runs on HDPI (1.5) screens and I am trying to get the dimensions of my pngs and my values in my dimension.xml to be compatible with XHDPI (2.0) screens.

For example, my background png is currently 1280px x 800px and it works well with my HDPI (1.5) screen. I assumed this would mean that I would need a 1280 * (4/3) = 1706.67px by 800 * (4/3) = 1066.67px dimension png. This did not show the same as my current tablet.

Also, my screens are almost exactly the same size

2

2 Answers

0
votes
  • LDPI = 0.75x
  • MDPI = ORIGINAL
  • HDPI = 1.5x

If you have an image 1000X1000 (pixels) you have to create the following versions of the image:

  • LDPI = 750x750
  • LMDPI = 1000X1000 (THE ORIGINAL IMAGE SIZE)
  • MDPI = 1500X15000

Except, in @dimension, HAS NOT put some values "dp" or "sp" and then used them in the style of the image.