How do I do the layout of an android app in Photoshop using PX if google just gives me DP?

4

I'm trying to draw the layout in photoshop, but I can not understand this story of DP in photoshop, in code okay, the compiler understands, but in photoshop I can only work on PX.

Can anyone help me with this? Type, height of bar status or action bar, distance of elements and etc.

    
asked by anonymous 19.11.2014 / 11:56

1 answer

2

You need to convert from pixel to dp depending on the density of the screen you intend to develop, pixel relation dp is given by:

pixel / density

For example, if you want to develop for hdpi density the density value is 2.0x, if you have a 500p wide image the equivalent in dp is given by:

500 / 2.0 = 250dp

Of course depending on the layout this value can be adapted, if the result gives a fractional value and so on.

I recommend reading this page . This should help you better understand the densities of Android.

    
19.11.2014 / 14:11