4

I'm part of the Android development team at a small company in the city where I live.

We're working on building different apps and currently there's this app we have the design as a .sketch file but the layouts are only drawn for iOS devices and we need to adapt based on those guidelines. The thing is there are 2 different layouts for the iPhone SE and for the iPhone X. They are mainly the same but a few things differ like font sizes, margins, paddings, etc.

I want to implement the design on Android to also be dynamic depending on the user's resolution (or DPI, better said) so I'm trying to use the dimens-xyz.xml files to set my sizes in there and use those values as references in my layouts so I only write one layout xml for each screen, no matter the DPI.

So far, so good. My question is: What are the Android equivalent screen DPIs for the iPhone SE and iPhone X? What dimens-xyz files do I need to use in order to keep the UI consistent for smaller and larger screen devices and have the UI be "responsive".

It's hard to find a relevant answer on Google because it's kind of a technical question and when Google sees iphone and screen in the same search query it starts throwing results of comparing screens for iOS vs Android phones.

PS: I have 0 prior knowledge on iOS development and internals

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Daniel Bejan
  • 1,468
  • 1
  • 15
  • 39

1 Answers1

1

For iPhone SE, having a 4.7 inch display and 1334 by 750 resolution, you can go with 4.7 WXGA which is a 720 by 1280 equivalent in Android (the closest i could find). As for Iphone X it has a resolution of 2436×1125, with a 5.8 inch display giving a PPI of 462.63. Closest in Android would be Pixel 3A, with 2220x1080 and 440 dpi.

Mihai Neacsu
  • 245
  • 1
  • 3
  • 10
  • 1
    Any idea how to convert these to Android's `ldpi`, `mdpi`, `hdpi`, `xhdpi`, etc?.. Not particularly for these phones but maybe generally – Daniel Bejan May 12 '20 at 10:29
  • Basically both are going under xhdpi, as the pixel density is in the same range. You have here a better representation with the values: https://stackoverflow.com/a/49292884/2607246 – Mihai Neacsu May 12 '20 at 14:12