0

I remember seeing how to do this somewhere, but I'm totally drawing a blank right now. I'd like to use the Android "Refresh" graphic in my application, how do I reference it? Is there a chart somewhere of all graphics which are provided?

Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411

2 Answers2

3

Easiest way is to look in your Android SDK location (on my machine, that is *C:\projects\android\android-sdk-windows-1.5_r1*): in the platforms folder is a separate directory for each version of Android. Pick your version of choice and then open the *data\res* folder: there will be a number of drawable folders with the platform graphics.

Go wild copying them into your own app.

Femi
  • 64,273
  • 8
  • 118
  • 148
  • 1
    This is a bit of a bummer, but you're right. One would think that in order to keep application design consistent with the platform, Google would _urge_ developers to use these images, but alas, they hide them instead. – Naftuli Kay Jul 21 '11 at 00:40
  • Well, they aren't really hidden: they are actually distributed with EVERY Android SDK download and are in a standard location. They could do a better job of calling out in the dev guide that these are available for your programming pleasure, but... – Femi Jul 21 '11 at 00:48
  • When I say hidden, I mean hidden from direct usage. I can't just dial in `android.R.drawable.ic_menu_refresh` from my application and expect it to work. – Naftuli Kay Jul 21 '11 at 00:51
  • Ah. Well, I believe many of those are in the `android.R.attr` namespace somehow, but that is a very good point: they could have exposed them in the top-level `R.drawable` namespace. Then again maybe they're trying not to clutter up that namespace. – Femi Jul 21 '11 at 00:53
0

I think this might be what you're looking for: http://androiddrawableexplorer.appspot.com/

Pure Function
  • 2,129
  • 1
  • 22
  • 31
  • Unfortunately, that doesn't help much, as the active refresh image isn't there. I can't seem to find it in `android.R.drawable` either :( – Naftuli Kay Jul 21 '11 at 00:30
  • I think Femi is correct. there is a similar question to yours here: http://stackoverflow.com/questions/2687027/standard-android-menu-icons-for-example-refresh – Pure Function Jul 21 '11 at 00:39