Android Studio之自定遊戲圖標

Android Studio之自定遊戲圖標

Android遊戲都有其icon圖標.而且該圖標也會Google Play上展示.要自定圖標需在遊戲項目『\app\src\main\res\mipmap-xxx』查找icon圖標.然後將其替換.若Eclipse則在drawable目錄下. 並且隨著手機屏幕分辨率不斷進化.遊戲需要提供不同密度圖標『自適應圖標』.圖標分為兩類『圓』與『方』.並且需要在AndroidManifest.xml添加icon圖標屬性.

<application  android:icon=”@mipmap/ic_launcher”

android:roundIcon=”@mipmap/ic_launcher_round”>

Android Studio帶有icon圖標生成器,全自動生成所有不同分辨率圖標.在Eclipse你需要用PS生成.

  1. 項目右擊『New->Image Asset』
  2. Icon Type:選Launcher Icons(Adaptive and Legacy)
  3. Name:填ic_launcher
  4. Asset Type:勾選Image
  5. Path:輸入自定圖標路徑
  6. Trim勾選Yes
  7. Resize拖到100%
  8. Legacy Icon勾選Yes
  9. Gound Icon Generate勾選Yes
  10. Google Play Store Icon勾選Yes
類型 文檔名
方形 ic_launcher.png
圓形 ic_launcher_round.png
前景 ic_launcher_foreground.png
背景 ic_launcher_background.png

 

目錄 簡介 分辨率
mipmap-mdpi 中密度圖標(必須有) 48*48
mipmap-hdpi 高密度圖標 72*72
mipmap-xhdpi 超高密度圖標 96*96
mipmap-xxhdpi 超超高密度圖標 144*144
mipmap-xxxhdpi 超超超高密度圖標 192*192

 

評論