skip to Main Content

To my understanding, I need to create several different versions of my image drawables, varying by size so that devices load the appropriate one.

In my Photoshop mockup of my app, I have an icon image that is 12px x 12px on my monitor.

  1. What various sizes/dimensions do I have to make of the icon?
  2. Should the icon stretch to the sides of the drawable’s dimensions or should there be some padding?

Thanks.

2

Answers


  1. Scroll down to ‘Alternative drawables’ to get your answers:
    http://developer.android.com/guide/practices/screens_support.html

    The size of your photoshop mock up will define what your base is.
    When I’m not sure what I do is take an icon and drop it in one of the drawable folders, for example let’s say xhdpi, and only in that one. From there I launch the app and see how the icon look on my phone. If it’s too small then I move to the next folder down, in this case hpdi. If it was too big I would move it to the next folder up, in this case xxhdpi.
    From there you can calculate the size of the other drawables, using the example on that link.

    Login or Signup to reply.
    1. For reference see the sizes of default ic_launcher icons provided by android for your app in every drawable or mipmap folder when you first create a new project.

      See the sizes in pixels and do the same for your custom icon.

    2. Its your wish if you want to give padding to your icon image or not. Its up to you how you want to make your icon look.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search