Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use system icons in my android app?

Tags:

android

icons

I am programming an android application and I'd like to use the system icons for mail, phone, calendar and contacts inside this application. The problem is, that these icons differ from system to system (different android versions and different smartphones) and I want to keep the application and the system consistent. Is there an easy way to achieve this?

like image 585
ashiaka Avatar asked Sep 04 '12 12:09

ashiaka


People also ask

Can I change app icons on Android?

Tap the menu button in the top left, and select My Stuff. At the top of the screen, tap the Icons option. Then tap the icon pack you wish to apply. At the bottom of the page, select the Apply option.

Where are system icons stored Android?

System apps are kept in /system/app. User-installed apps are in /data/app. The default launcher is a system app, but the device may be running a user-installed launcher instead.


2 Answers

In XML use default android drawables from @android:drawable/... and in code use android.R.drawable....

like image 104
slezadav Avatar answered Oct 18 '22 12:10

slezadav


You can use the standard drawable using @android:drawable/[icon_name] in your xml file android.R.drawable.[icon_name] in your java code

You can see different icon in your file system in [SDK PATH]/platforms/platforms/[ANDROID_VERSION]/data/res

Some images are standard...like contacts, calendar :)

like image 35
arnouf Avatar answered Oct 18 '22 12:10

arnouf