@2x retina image equivalent in Android
Asked Answered
C

1

13

I'm converting a iOS application to android. (using android studio)

I have all my image as [email protected]

So, My 2 questions:

1- Can I copy all my @2x to ONLY folder "xhdpi", and android will auto adjust density for the devices?

2- Was "xhdpi" really the equivalent of xcode @2x ?

Calm answered 25/11, 2015 at 23:3 Comment(0)
D
12

You should read this as it will give you a good start on the sizes of all your images and it helped me when i was starting out developing for Android http://developer.android.com/guide/practices/screens_support.html

But basically android devices use different DPI images depending on the screen size. If you don't have the DPI that the device uses then it will apply the closest DPI, however this may give a pixilated or stretched look to your app.

There is no DPI that is equal to Retina. The following are some of the screen sizes based off MDPI which is the same size as non-retina.

  • MDPI = Non-Retina = 100% image
  • HDPI = 150% image
  • Retina = 200% image
  • XHDPI = 225% image

http://www.teehanlax.com/blog/density-converter/

You will need to have a folder in your images folder for each DPI that your app will support. If your going to be working with the latest devices only then you will probally only need HDPI, XHDPI and XXHDPI

Dree answered 26/11, 2015 at 7:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.