1

I would really know how to create proper drawables for android mobile phones. According to lessons from udacity "Android Design for Developers".

Aim: create identical size drawable on screen as it was designed on image. What do I know:

  1. screens size 1440x2560 px

enter image description here

  1. density is 560 dpi - which is xxxhdpi
  2. so, screen in dp dimensions is 411x731 dp
  3. icon is 158x158 px
  4. I know I should put this in xxxhdpi folder.

Should I scale down whole image to dp dimensions (411x731 px) and then design 150x150px "man" to keep the same size in android screen as it was created on image? How could I mange it? So far I use to create "lucky size of image" to get proper size or I was defining custom size in code. But this not the clue. Help.

PS. please do not reffer to supporting screens android page because I were there.


I do not know what px size should have "man" picture for xxxhdpi to get the same size as is on image after taking screenshot.

deadfish
  • 11,996
  • 12
  • 87
  • 136

1 Answers1

1

See. You image dimensions for xxxhdpi is 158x158 px.

Let's take mdpi as 1x. then, hdpi = 1.5x xhdpi = 2x xxhdpi = 3x xxxhdpi = 4x

4x = 158x158 (let's add some margin and make it 160x160)
1x = 40x40
1.5x = 60x60
2x = 80x80
3x = 120x120
4x = 160x160
agamov
  • 4,407
  • 1
  • 27
  • 31
  • I think there is small misunderstanding. I do not know what px size should have "man" picture for xxxhdpi to get the same size as is on image after taking screenshot. Do you follow me? – deadfish Sep 09 '15 at 10:06
  • if this screenshot was taken from xxxhdpi device, than you just slice out the man out of picture and save it in drawable-xxxhdpi folder. Then on any device (regarding of exact size of density value) it should be exactly the same physical size (not px, but cm). It's a good practice to scale down the image for other density-buckets as well (so that android doesn't do it for you in runtime). – agamov Sep 09 '15 at 11:00