views:

69

answers:

3

I want to use a SlidingDrawer in an activity, and I would love to just use the built-in tray handle, rather than try to find or create my own. I found it online thanks to CommonsWare but I assume that they got it from the Android platform itself, so I figure it will benefit me in the long run to know where to find it, rather than just use their copy of it. I looked for it in my Android SDK installation, under platforms/android-8/android.jar/res/ but with no success.

SlidingDrawer handle

Where can I find the above image, in the Android SDK itself, rather than just downloading it?

+1  A: 

may be you can type android.R.drawable... in eclipse and let the intelli-sense display all the built in drawables.

but I think it's not there cause I searched for it and didn't find it too

thanks

Mina Samy
+1 even though it doesn't directly answer the question at hand, because that is definitely the best/easiest place to start looking.
MatrixFrog
+1  A: 

Look in the launcher app: ~\platform\packages\apps\Launcher\res\drawable\handle.xml

It uses all the drawables: tray_handle_normal, tray_handle_pressed, tray_handle_selected.

dhaag23
It looks like Launcher is not part of the SDK so you would have to get that from the Android source at http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git right?
MatrixFrog
Yeah, that's where I found the images -- from the Android source. I'm constantly looking through the source for sample code and to get a deeper understanding of how things work. I'd recommend it for all Android developers.
dhaag23
A: 

Be carefull with using images that come with the system. Google itself states that they will not guarantee that these images will be included in the system in every release (the name may change). Also the design of your app will change if the user uses something like Blur or Sense that overrides a lot of the standard design items. If you use a copy of the drawable itself you now how your app will look and you can be sure that your app will keep working even if the manufacturer or Google changes the images that come with a device.

Janusz
Right. I would definitely copy the image into my `drawables` folder and then use that copy.
MatrixFrog