219

The Android SDK offers the standard menu icons via android.R.drawable.X. However, some standard icons, such as ic_menu_refresh (the refresh icon), are missing from android.R.

Is there any way to get the original icons, maybe by extracting them from the applications? I already checked the Android source, but it's a bit too huge to look everywhere for the images.

I know the Android Drawables website, but I would like to get the correct hdpi, mdpi and ldpi version, preferable the original ones.

poke
  • 369,085
  • 72
  • 557
  • 602
  • 1
    Check this. It's by Google: https://design.google.com/icons/ – Atul Jun 02 '16 at 18:36
  • Related post - [How to use default Android drawables](https://stackoverflow.com/q/3201643/465053) & [Where are all the standard Android icon resources?](https://stackoverflow.com/q/7352898/465053) – RBT Aug 10 '18 at 00:53

5 Answers5

208

Never mind, I found it in the source: base.git/core/res/res and subdirectories.

As others said in the comments, if you have the Android SDK installed it’s also on your computer. The path is [SDK]/platforms/android-[VERSION]/data/res.

poke
  • 369,085
  • 72
  • 557
  • 602
  • 60
    They are also on your development machine, in your SDK installation. – CommonsWare Apr 21 '10 at 23:04
  • 1
    Oh, you are right, they really are. Thanks, I feel stupid for downloading the git repository now ^^ – poke Apr 22 '10 at 08:49
  • 49
    At ANDROID_SDK/platforms/android-2.1/data/res/drawable-hdpi for example. – Macarse May 15 '10 at 14:26
  • @Macarse How do we favorite a comment such as yours? I have to use google to find this topic and find your comment every time I want to find a standard icon, because that directory is too obscure to remember and not mentioned anywhere else on the internet. – ArtOfWarfare Aug 17 '12 at 20:41
  • @ArtOfWarfare Adjusted the answer to include the information. – poke Aug 18 '12 at 00:58
  • @poke How do we use the icons in the sdk folder in our xml files? As [at]drawable doesn't work for that. – h8pathak Jun 21 '16 at 09:37
  • @h8pathak You copy them into your project ;) At least that’s what I usually do. – poke Jun 21 '16 at 10:47
99

Bear in mind, this is a practice that Google explicitly advises not to do:

Warning: Because these resources can change between platform versions, you should not reference these icons using the Android platform resource IDs (i.e. menu icons under android.R.drawable).

Rather, you are adviced to make a local copy:

If you want to use any icons or other internal drawable resources, you should store a local copy of those icons or drawables in your application resources, then reference the local copy from your application code. In that way, you can maintain control over the appearance of your icons, even if the system's copy changes.

wvdz
  • 16,251
  • 4
  • 53
  • 90
DMags
  • 1,621
  • 1
  • 13
  • 12
  • 11
    Right, I was just letting the OP know they should have been using local copies from the start, rather than by reference. – DMags Apr 07 '11 at 14:54
  • 2
    For that puropose, some guys have made a simple icon browser/copy tool to easily copy icons from the SDK to your project: https://bitbucket.org/simendsjo/android-icon-utils – Nilzor Jul 11 '14 at 10:19
  • @Nilzor this tool seems to have been broken by the addition of XXXhigh icons. Pointing it to API22 SDK results in an error. Still works for older SDKs. – codah Jul 22 '15 at 00:28
45

Maybe a bit late. Completing the other answers, you have the hdpi refresh icon in:

"android_sdk"\platforms\"android_api_level"\data\res\drawable-hdpi\ic_menu_refresh.png

Gabriel Llamas
  • 18,244
  • 26
  • 87
  • 112
24

After seeing this post I found a useful link:

http://developer.android.com/design/downloads/index.html

You can download a lot of sources editable with Fireworks, Illustrator, Photoshop, etc...
And there's also fonts and icon packs.

Here is a stencil example.

António Almeida
  • 9,620
  • 8
  • 59
  • 66
6

You can get the icons from the android sdk they are in this folder

$android-sdk\platforms\android-xx\data\res

Moog
  • 10,193
  • 2
  • 40
  • 66
yostane
  • 383
  • 1
  • 4
  • 19