Skip to main content

Application icon tutorial for Android


    Assigning an icon to your Android application just takes a minute.  Actually creating the icon may take a bit longer.




  1. Create a 48×48 PNG and drop it into /res/drawable.  The name of this file is usually “icon.png”.
  2. Open your AndroidManifest.xml.
  3. Right under the root “manifest” node of the XML, you should see the “application” node.  Add this attribute to “application”. (The “icon” in “@drawable/icon” refers to the file name of the icon.)
android:icon="@drawable/icon"


Your app is now iconned.
To support multiple resolutions, you can create icons of different resolutions and place them in the correct folders.
  • Low density
    • res/drawable-ldpi
    • 36×36 resolution
  • Medium density
    • res/drawable-mdpi
    • 48×48 resolution
  • High density
    • res/drawable-hdpi
    • 72×72 resolution
  • Extra high density
    • res/drawable-xhdpi
    • 96×96 resolution

ldpi (120 dpi)
(Low density screen)
mdpi (160 dpi)
(Medium density screen)
hdpi (240 dpi)
(High density screen)
xhdpi (320 dpi)
(Extra-high density screen)
Launcher Icon Size36 x 36 px48 x 48 px72 x 72 px96 x 96 px



Application Icons in Android Market

If you are publishing your application on Android Market, you will also need to provide a 512 x 512 pixel, high-resolution application icon in the developer console at upload time. This icon will be used in various locations in Android Market and does not replace your launcher icon.

Comments

Popular posts from this blog

Google re-branded the support Android libraries to AndroidX

It is important to note, you cannot mix AppCompat and Jetpack in the same project. You must convert everything to use Jetpack if you want to upgrade. The support library artifacts are being deprecated and all future development is going into AndroidX , so there's no avoiding this migration. Alan Viverette sums this up nicely: “There won’t be a 29.0.0, so Android Q APIs will only be in AndroidX” The stable release of 28.0.0 will be the final feature release packaged as android.support . All subsequent feature releases will only be made available as androidx-packaged artifacts. Below tips will give you a clearer transition path. The current version of AppCompat (v28.x) is exactly the same as AndroidX (v1.x). In fact, the AppCompat libraries are machine generated by changing maven coordinates and package names of the AndroidX codebase. For example, android.support.v7.app.AppCompatActivity is now androidx.appcompat.app.AppCompatActivity For a complete listi...

Android Studio Release Updates

JetBrains's  Android Studio’s 10 year anniversary      I remember the major change which has taken place since I started learning android is Android Studio migration from Eclipse. Android Studio’s 10 year anniversary. Watch official youtube : Android Studio’s 10th birthday: our favorite moments!      In December 2014 , Google launched Android Studio, Google's official Integrated Development Environment (IDE) based on IntelliJ and it discontinued the Android Developer Tools (ADT) plugin for Eclipse, which means it’s time to leave eclipse behind.        Fortunately, we had simple solution to migrate, Android Studio offered a better experience for Android developers and its migration functionality does most of the work for you.      Open Android Studio and click on the option:  Import project (Eclipse ADT, Gradle, etc) Before Android studio      1. users had to go download a JDK, then download Eclipse...

Android Pi migration(28 API support)

I am here to give some inputs on android PI migration. .  Apps must target at least API level 28 to ensure it is built on the latest APIs optimized for security and performance . From August 2019, new apps must target at least Android 9.0 (API level 28) . The objective here is to make sure that your existing app works as-is on Android 9. Because some platform changes might affect the way your app behaves, some adjustments might be necessary, but you do not need to use new APIs or change your targetSdkVersion. Android Service Problem On Oreo, startService() will throw IllegalStateException. This can be fixed by changing it to startForegroundService(). but it also stops the service immediately if you don’t bind to the Notification with Service.startForeground() within 5 seconds. For other background service we decided to use the WorkManager . Implementation: Since we have minSdkVersion 19, We migrated to workmanger for scheduled tasks and we still use JobInten...