skip to Main Content

I don’t get it.

I want to create my own icon – a toggle icon – using Photoshop.

How big should this icon be?

should I write for example in xml for mdpi 48x48dp or wrap_content?

48dp looks so small, and 96dp looks so big..

What sizes shall I choose?

Thanks a lot.

2

Answers


  1. You have to make same icon for different sizes like below:

    36x36 (0.75x) for low-density : ldpi
    48x48 (1.0x baseline) for medium-density : mdpi
    72x72 (1.5x) for high-density :hdpi
    96x96 (2.0x) for extra-high-density : xhdpi
    144x144 (3.0x) for extra-extra-high-density : xxhdpi
    192x192 (4.0x) for extra-extra-extra-high-density : xxxhdpi
    

    add these icon with same name in different drawable folder according to their density.

    Login or Signup to reply.
  2. dp is Density Pixels which are virtual pixels, real pixels are different

    if you defined 100dp (density pixels) will be translated into real pixels on a variety of screens:

    on ldpi screen

    100.00dp = 75.00px
    

    on mdpi screen

    100.00dp = 100.00px
    

    on hdpi screen

    100.00dp = 150.00px
    

    on xhdpi screen

    100.00dp = 200.00px
    

    so there’s have to be four image resources with different values under the same name in the project(app).

    There’re two ways to To import these four images to support all four screens.

    First, make 4 images in photoshop with the different pixels 200px, 150px, 100px, 75px these values depends on 100dp, they change if you change 100dp

    Second, (Best Approach). make just a 200px image in photoshop and Download ( Android Drawable Importer plugin ) on android studio than use its ( Batch Drawable importer ) feature to import the 200px

    Note there are more that these four screens like Smart Watch(smaller than ldpi) and TV (larger than xhdpi), but these four are the commonly used

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