手机开发指南 > Android > Icon



Android アプリケーション開発時の アプリ アイコンの変更方法



 AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="sample.app">
   <application android:icon="@drawable/icon">
       <activity class=".SampleAndroid" 
           android:label="@string/app_name">
       <intent-filter>
           <action android:value="android.intent.action.MAIN" />
           <category 
               android:value="android.intent.category.LAUNCHER" />
       </intent-filter>
       </activity>
   </application>
</manifest>


  • アプリアイコンに設定できる画像は通常、48×48ピクセルの透過PNGファイル
  • アプリケーションのアイコンとラベルは、要素の「android:icon」属性と「android:label」属性に定義する。
  • ここで定義したアイコンとラベルはそのまま、Android Marketやインストールされる
  • 「"@drawable/icon"」は、res/drawableフォルダにあるicon.pngを参照するということを意味
  • Android端末の起動画面など、あらゆる場面でユーザーに表示されるので、注意。



  戻る

     




Front page   Edit Unfreeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes