Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are all the standard Android icon resources?

Tags:

java

android

I have just started writing my first ever Java/Android application, so forgive the total n00b question.

How do you access the the standard operating system icons such as search icon/menu icon etc? They are not in the res/drawable folder where I would expect to find them. Are they available as part of the SDK or must you download them seperately?

EDIT

Maybe you can help me further - I am getting the following error (repeated on):

[2011-09-08 19:59:47 - TweetTab] C:\Users\Dan\workspace\TweetTab\res\menu\options_menu.xml:4: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/ic_menu_search'). 

However, the icon is not empty, the xml looks like this:

<?xml version="1.0" encoding="utf-8"?>  <menu xmlns:android="http://schemas.android.com/apk/res/android">     <item android:id="@+id/search"         android:icon="@drawable/ic_menu_search"         android:title="@string/search"/> </menu> 

Am I missing something?

SOLVED

I changed android:icon="@drawable/ic_menu_search" to android:icon="@android:drawable/ic_menu_search" and it could then find the icon.

like image 884
jcvandan Avatar asked Sep 08 '11 18:09

jcvandan


People also ask

Where are Android icons stored?

Then after installing your app, the OS will pick the icon that matches your phone configuration and create a shortcut on your installed apps page. The icons reside inside the . apk of each individual app.

What is resource folder in Android?

The res/values folder is used to store the values for the resources that are used in many Android projects to include features of color, styles, dimensions etc.

How do I manage resources in Android?

Resource Manager is a tool window for importing, creating, managing, and using resources in your app. You can open the tool window by selecting View > Tool Windows > Resource Manager from the menu bar or by selecting Resource Manager on the left side bar. Click Add to add a new resource to your project.


1 Answers

You can acces them via android.R.drawable.* or in xml by @android:drawable/something.

like image 160
Salw Avatar answered Oct 14 '22 14:10

Salw