change app icon, android change icon, change app icon in android, android studio, How to change the app icon in android studio

How to change the app icon in android studio

An application is identified by the icon that is visible on the mobile device or in the play store. Therefore, customizing the icon of your android app is something that is inevitable. For the popular applications, like Uber and google maps there is how we identify them since there are people who usually duplicate applications and give them similar names. By default, while creating an application in android studio, there is an icon that is assigned to your app. For you to customize your app you must change the app icon to either your logo or any other image you choose.

In this article, we shall highlight the steps followed while changing the app icon in android studio and replacing the default icon with your desired image.

To change the app icon in android studio,

  • Open the android studio and let it load your project
  • Inside your app folder in the left sidebar, scroll to the res folder
  • In the layouts folder, open the mipmap folder

How to change the app icon in android studio

  • Next, you will need to copy the image you want to use as the app icon to the mipmap folder
  • In the mipmap folder, you will find that there are various extensions of the image

The round icon and non-round icon to fit into all devices

mipmap-mdpi which is always 48 by 48 pixels

mipmap-hdpi which is always 72 by 72 pixels

mipmap-xhdpi which is always 96 by 96 pixels

mipmap-xxhdpi which is always 144 by 144 pixels

mipmap-xxxhdpi which is always 192 by 192 pixels

It is always advisable to follow the set rules to ensure that the icon will fit well on almost all mobile devices

Also, the icon should have the same name

  • Once you copy the specified image sizes in the different folders of the mipmap, you will now need to tell your app to change from the default icon to the one you have added
  • Open the manifest file, inside the application tags update the icon attribute and round icon attribute to the name of your image, for this example, the image used is ss8b

android:icon="@mipmap/ss8b"

android:roundIcon="@mipmap/ss8b"

The code snippet below shows the full code of android manifest file

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

    package="com.example.kotlinexample">

    <uses-permission android:name="android.permission.INTERNET"></uses-permission>

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>

    <application

        android:allowBackup="true"

        android:icon="@mipmap/ss8b"

        android:label="@string/app_name"

        android:roundIcon="@mipmap/ss8b"

        android:supportsRtl="true"

        android:theme="@style/Theme.KotlinExample">

        <activity android:name=".HomeActivity"></activity>

        <activity android:name=".RegisterActivity" />

        <activity android:name=".MainActivity">

            <intent-filter>

                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />

            </intent-filter>

        </activity>

    </application>

 

</manifest>

  • Finally, you will need to run your app and observe the new icon that will appear on your screen