If mobile access is poor, please use –> GitHub version
Content continuous Update, updated on: 2016-08-11
1. Program startup icon (Icon Launcher)
Put mipmap-*dpi
it under the file nameic_launcher.png
- L dpi (Low Density screen,120 dpi) with an icon size of X-px
- M dpi (Medium Density screen, DPI) with an icon size of x px
- H dpi (High Density, + dpi) with an icon size of x px
- XH dpi (extra-high density screen, at + dpi) with an icon size of X-px
- Xxh dpi (xx-high density screen, 480 dpi) with an icon size of 144 x 144 px
- Xxxh dpi (xxx-high density screen, 640 dpi) with an icon size of 192 x 192 px
Tip: Automatically generate the corresponding resolution icon launcher
Added on 2016-08-11
Using Android Studio
, module
or drawable
right new > ImageAsset
-click, a large image can be automatically cut into the DPI corresponding to the resolution of the Icon launcher.
Detailed Operation reference:
- Select the type of picture you want to generate:
Launcher Icons
;
- Name will be generated automatically
ic_launcher
, if not then fill in ic_launcher
;
Asset Type
Set into Image
;
path
Select the picture you want to create at the end of a column
- Adjustment
Shape
and other parameters;
- Click All
next
the way finish
.
PS: Shape
Other parameters used, such as rounded corners square
, will default to use a color that does not support transparency as the background, so to modify according to the specific icon, the special situation requires the designer to cut out a large picture with rounded corners and transparency.
2. Opacity 16 Binary Value
Opacity |
16 binary values |
100% |
Ff |
85D |
F2 |
80D |
E6 |
95D |
D9 |
90D |
Cc |
75% |
BF |
70% |
B3 |
65% |
A6 |
40g |
99 |
55% |
8C |
50% |
80 |
45% |
73 |
60g |
66 |
35% |
59 |
30% |
4D |
25% |
40 |
20% |
33 |
15% |
26 |
10% |
1 A |
5% |
0D |
0% |
00 |
3. DP and PX Conversions and relationships
Conversions for each DPI:
Data summary table:
name |
corresponding DPI |
scale (in MDPI as base 1) |
the conversion relationship with PX |
Lpdi |
+ DPI |
0.75 |
1 DP = 0.75 px |
mdpi |
DPI |
1 |
1 DP = 1 px |
hdpi |
DPI |
1.5 |
1 DP = 1.5 px |
xhdpi |
-DPI |
2 |
1 DP = 2 px |
xxhdpi |
480 DPI |
3 |
1 DP = 3 px |
xxxhdpi |
640 DPI |
4 |
1 DP = 4 px |
DP to PX
Given here: the DP * DP
The corresponding image resolution is:
- Lpdi? PX * + px
- Mdpi? PX * px
- Hdpi? PX *
- Xhdpi? + px * 480 px
- Xxhdpi? PX * 720 px
- Xxxhdpi? PX * 960 px
PX to DP
From the px
conversion dp
to know what it is designed by the dpi
standard, according to the conversion relationship table can be obtained accordingly dp
.
For example, in xxhdpi
a standard-designed UI, where the resolution of one of the graphs is 600 px * 360 px
, according to the conversion relationship table, in the standard, the xxhdpi
1 dp = 3 px
corresponding dp
is 200 dp * 120 dp
.
Turn:
51910874
Android must know-app common icon Size Specification summary