Create Launcher Icon For Your Android App

Posted by Unknown Selasa, 31 Januari 2012 0 komentar
If you followed my last blog on Writing Your First Android App - Body Mass Index Calculator, you should have a good idea on creating simple nice apps for Android. In this post, I will cover how to add a launcher icon for the app (instead of the android robot icon shown by default).

1. Prepare the Icons

You need to create a set of icons with different resolutions and dimensions to suit with different types of phone displays. Android developer website provides a set of template icons, that you can use to start designing your icons. They are photoshop files with .ps extensions. You can also use free tools like GIMP to open these template files and modify them, or you can create the icon images from the scratch.

Here are the specified dimension (width x height) and the resolution (dpi) of the icon for different types of displays.
  • Low density screens (ldpi): 36x36px, 120dpi
  • Medium density screens (mdpi): 48x48px, 160dpi
  • High density screens (hdpi): 72x72px, 240dpi
  • Extra high density screens (xdpi): 96x96px, 320dpi
Android developer website recommends you make use of alpha channel in your icons for transparency. That gives the icons a cool look with any background image.

    Here is the set of icons I prepared for the BMI Calculator app.

    2. Add Icons to your project

    Open the 'res' directory in your project and copy the icons into the corresponding sub directories listed heer.
    • Low density screen icon : res/drawable-ldpi
    • Medium density screen icon : res/drawable-mdpi
    • High density screen icon : res/drawable-hdpi
    • Extra high density screen icon : res/drawable-xdpi
    Make sure you rename all your icons to "ic_launcher.png". Once you finish, the directory structure should look like the following screenshot.


    That's it. If you put the icons in the correct directory with the correct name, the android development kit will pick them and use for the launcher icon of you app.

    2. Test the launcher icon in your phone

    Check reinstalling the app on your phone. (You can redo the step5 mentioned in the previous blog (Writing Your First Android App - Body Mass Index Calculator) to reinstall the app on your phone. Click the app drawer and see how well the icon of your app goes with other apps.

    You can download the eclipse project and the android app that we created in this post from following links.
    Download the eclipse project files (zipped) com.blogger.android.meda.bmicalculator-updated.zip
    Access the Source code from github github repo
    Download the free BMI Calculator app (the latest version) from the Android Market. Available in Android Market
    TERIMA KASIH ATAS KUNJUNGAN SAUDARA
    Judul: Create Launcher Icon For Your Android App
    Ditulis oleh Unknown
    Rating Blog 5 dari 5
    Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke https://androidemoticonss.blogspot.com/2012/01/create-launcher-icon-for-your-android.html. Terima kasih sudah singgah membaca artikel ini.

    0 komentar:

    Posting Komentar

    Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android emoticons.