Android studio-Image Asset自動生成背景透明圖檔

Android studio-Image Asset自動生成背景透明圖檔
Android studio-Image Asset自動生成背景透明圖檔
Android studio-Image Asset自動生成背景透明圖檔
Android studio-Image Asset自動生成背景透明圖檔

『Android studio』內置架餐『Image Asset』. 畀幅圖檔佢,『Image Asset』帮你自動生成各式圖檔.

揀『Launcher Icons(Legacy only)』冚辦闌圖檔背景透明.

『Android 8.0』及以上,程式圖檔强制背景色,揀『Launcher Icons(Adaptive and Legacy)』.

Android 8.0及以上 圖檔背景白色 Launcher Icons(Adaptive and Legacy)
Android 7.1及以下 圖檔背景透明 Launcher Icons(Legacy only)
  1. 揀『Project』->『app』
  2. 撳『File』->『New』->『Image Asset』
  3. 設置『Asset Studio』
Configure Image Asset Android 8.0(API 26) 及以上
Icon type Launcher Icons(Adaptive and Legacy)
Name ic_launcher
Layer name ic_launcher_foreground
Asset type Image
path 『.png』背景透明圖檔
Trim 修剪勾yes
Resize 100%
Asset type 勾Color
Color 0xFFFFFF

 

Configure Image Asset Android 7.1以下
Icon type Launcher Icons(Legacy only)
Name ic_launcher
Asset type 勾Image
Path 『.png』背景透明圖檔
Trim 修剪勾yes
Padding 0%
Background 背景0xFFFFFF
Scaling Crop/ Shrink to fit自适应宽度
Shape 揀None
Effect 勾None

 

 

資料夾 Size(px)
mipmap-xxxhdpi 192*192
mipmap-xxhdpi 144*144
mipmap-xhdpi 96*96
mipmap-hdpi 72*72
mipmap-mdpi 48*48

 

評論