Posts tagged Icon
How to change the icon of your Android app
Dec 26th
Posted by EnvyAndroid in Android
This is just a small follow-up post to The easiest way to create nice icons for Android apps.
Say, if you follow that guide, and have made an icon to represent your app, how do you use it?
If you have one icon image, or three icon images (one for each screen density, ldpi, mdpi and hdpi, like in the guide), you put your icon files in the res/drawable folder where they belong.
Depending on what API level you are creating your Android application for, in your “res” folder you either have one folder called “drawable” or three folders called “drawable-ldpi”, “drawable-mdpi” and “drawable-hdpi”.
For application launcher icons, the sizes are:
- Low density – ldpi – 36×36 px
- Medium density – mdpi – 48×48 px
- High density – hdpi – 72×72 px
When you have put your icon in the folder/folders, open up your AndroidManifest.xml file and choose to view it as XML.
For a new Android application, the AndroidManifest.xml file will look like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.application"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".YourAppName"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
And on line 6 you can see the attribute that specifies your applications icon:
android:icon="@drawable/icon"
The /icon refers to the default icon.png file in your drawable folder (or the drawable-ldpi/mdpi/hdpi folders).
If substitute “icon” with the name of your icon file, you will change the icon of your app.
The easiest way to create nice icons for Android apps
Dec 26th
Posted by EnvyAndroid in Android
In this article I will show you a very easy way to create nice looking icon drawables you can use in your Android applications.
Using this method we can easily skip through the difficult and time-consuming parts of creating icons.
Yes, I know this method does not work for everyone, some Android developers have their own designer and so on, but for a small and simple app, this will definateley do!
The problem
Creating icons for Android apps may sound simple, but in fact, it is not as easy as it sounds…
There are a number of different icon categories, here are a couple of them:
- Launcher icons – The applications main icon
- Menu icons – The icons on the menu you get when pressing the menu button on your device
- Tab icons – Icons on tabs
- Status bar notification icons – Icons for your apps notifications
When creating icons for Android, you should create icons for different screen densities:
- Low density – ldpi – 36×36 px
- Medium density – mdpi – 48×48 px
- High density – hdpi – 72×72 px
(You can read more about the different icon dimensions here. Note: The dimensions in bold above, are for menu icons)
The Problem: Creating all those different icon types in several densities, with the right gradient color, shadow, borders, selected/unselected state etc, can be a time-consuming and irritating process.
We would like to save us some time!
