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
You have to make same icon for different sizes like below:
add these icon with same name in different drawable folder according to their density.
dp
is Density Pixels which are virtual pixels, real pixels are differentif you defined
100dp
(density pixels) will be translated into real pixels on a variety of screens:on
ldpi
screenon
mdpi
screenon
hdpi
screenon
xhdpi
screenso 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 on100dp
, they change if you change100dp
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 the200px
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