Converting iOS PT to Android DP?

Sandip Fichadiya picture Sandip Fichadiya · Feb 28, 2017 · Viewed 13.6k times · Source

I have a style guide of iOS app which specifies height, width, padding, font size etc in PT (1x as base). I have converted them successfully in pixels for various iPhones like iPhone 5,6,6s Plus, 7, iPad.

Now I need to use the same style guide for Android App, but I am clueless how should I convert iOS PT to android DP or pixel?

Is there any common method or something which can specify like: 30pt of 1x iOS converts into X dp (or pixel) of mdpi android?

I have searched but couldn't find hint for this. If someone could help me here, that would be great.

Answer

Bjørn Ruthberg picture Bjørn Ruthberg · Feb 28, 2017

The DP is supposed to be equal to the PT in IOS. You should not need any translation at all. They are both a representation of the experienced resolution, and they hide the true resolution.

By the way, you may have made a small mistake by using @2x as base for your design guide. When one works from a design guide one should not have to think about pixels, Only PT/DP. Only icons and images should be produced in different resolutions. The UI should be defined in PT/DP with 1x (The "official" resolution) as the base. For iPhone 4/4S that resolution would be 320x480 even though the actual resolution is 640x960. For Android it's not that simple because of the unrestricted sizes available for any vendor to produce. I would recommend using something like 1080p (DP) resolution for the design guide, but use a relative design, and be mindful of the components that will need to resize to accommodate any screen size.