Android application (how to change the icon )tutorial #2

38
4 Android Application Tutorial How to change the icon All Copy Rights Saved to the 7 th Students’ Conference on Communication and Information Based in the Faculty of Computers and Information Cairo University – Egypt 2011/2012 www.scci-cu.com Tutorial Code: APS-04-2012 Instructed on: 24-Feb-2012 | Tutorial: #04 By : Yasmine Sherif Mahmoud

description

Tutorials to show you how to change the icon of your Android Application.

Transcript of Android application (how to change the icon )tutorial #2

Page 1: Android application (how to change the icon )tutorial #2

4

Android Application TutorialHow to change the icon

All Copy Rights Saved to the 7th Students’ Conference on Communication and Information Based in the Faculty of Computers and Information Cairo University – Egypt 2011/2012 www.scci-cu.com

Tutorial Code: APS-04-2012

Instructed on: 24-Feb-2012 | Tutorial: #04

By : Yasmine Sherif Mahmoud

Page 2: Android application (how to change the icon )tutorial #2

• Create a new project as we learned before.• Don’t change anything in the code.• Notice where will your project be saved. (The

workspace location).• Follow the following steps :

Page 3: Android application (how to change the icon )tutorial #2

Expand the res file to see the three drawable files where you are going to save any pictures.hd represents high definition pictures.ld represents low definition pictures.md represents medium definition pictures.

This is my new project. Expand it.

Page 4: Android application (how to change the icon )tutorial #2

• My default location where my workspace exists is the (C:) drive.

• You can have a different location but if you have the same location go to (C:).

Page 5: Android application (how to change the icon )tutorial #2
Page 6: Android application (how to change the icon )tutorial #2
Page 7: Android application (how to change the icon )tutorial #2

Whatever your computer name is

Page 8: Android application (how to change the icon )tutorial #2
Page 9: Android application (how to change the icon )tutorial #2

Choose the project you are working on.

Page 10: Android application (how to change the icon )tutorial #2
Page 11: Android application (how to change the icon )tutorial #2

Choose any of the three files.I’ll choose the drawable-hdpi.

Page 12: Android application (how to change the icon )tutorial #2

• If you want to get the best resolution and a clean image you can specify the size of your picture.

• In Low definition use a 40x40 cm picture.• In Medium definition use a 100x100 cm picture.• In High definition use a 150x150 cm picture.• In this tutorial I’m not going to specify the size

of the picture. It will be resized automatically.

Page 13: Android application (how to change the icon )tutorial #2

This is the original icon which I want to change.

Page 14: Android application (how to change the icon )tutorial #2

• Now you can save any picture here in this file or you can open any program to draw your own picture.

• The picture is preferred to be a .PNG or .GIF or .JPEG

• I’m going to open the Paint program to draw a simple icon and save it in this file.

Page 15: Android application (how to change the icon )tutorial #2

This is a simple picture that I draw.

Page 16: Android application (how to change the icon )tutorial #2
Page 17: Android application (how to change the icon )tutorial #2

The location where the drawable files exit.

It must be a lower case name.

Preferred to be saved as a PNG image.

Page 18: Android application (how to change the icon )tutorial #2

Here is the new icon.

Page 19: Android application (how to change the icon )tutorial #2

• Now go to your project in Eclipse again.

Page 20: Android application (how to change the icon )tutorial #2

Expand the drawable file where you saved your picture and probably you won’t find it so:

Page 21: Android application (how to change the icon )tutorial #2

Clean here is just like a refresh button.

Page 22: Android application (how to change the icon )tutorial #2

Choose the project you are working on.

Page 23: Android application (how to change the icon )tutorial #2

After Cleaning your project, the picture will appear in the drawable file.

Page 24: Android application (how to change the icon )tutorial #2

Now go to this file.

Page 25: Android application (how to change the icon )tutorial #2

Choose this tab.

Page 26: Android application (how to change the icon )tutorial #2

Change the old icon name to the new one.

Page 27: Android application (how to change the icon )tutorial #2
Page 28: Android application (how to change the icon )tutorial #2

Save

Page 29: Android application (how to change the icon )tutorial #2

Run as

Page 30: Android application (how to change the icon )tutorial #2
Page 31: Android application (how to change the icon )tutorial #2

• You are supposed to have created the AVD (emulator) from our last tutorial.

• The emulator will run like that:

Page 32: Android application (how to change the icon )tutorial #2

Slide to unlock

Page 33: Android application (how to change the icon )tutorial #2
Page 34: Android application (how to change the icon )tutorial #2

Here is our application with its icon changed

Page 35: Android application (how to change the icon )tutorial #2

You can see the icon changed here too.

Page 36: Android application (how to change the icon )tutorial #2

• You may not find your application on the first time you run your emulator but it is ok you can try to:

1- Close the emulator and run it again. *if nothing changed: 2- Open the main.xml file and clean the project

then re-run the emulator again.

Page 37: Android application (how to change the icon )tutorial #2
Page 38: Android application (how to change the icon )tutorial #2

Yasmine Sherif EL-Adly

@YasmineSherif91

+Yasmine Sherif EL-Adly

Contact Me: