Only some drawables are accessible via the
Android SDK has all images unpacked in the %SDK-FOLDER%/platforms/android-*/data/res/drawable-*
folder. Just pick desired file and put it into your app resource.
you just need to add this in your imports list:
import android.R;
but i will make your own resources will have an error if you want to use it. The error will be something like:
R. cannot be resolved
So, I prefer not to import android.R
but import *my.own.package*.R;
then when I can normally use my own resource with R.drawable.*something*
without error,
and put android.R.*something_default*
to use the default android resources.
well, choosing which one to use, depends in what you need.. :)
I realize it's a bit more work, but as a workaround you could just set the image resource programatically.
findViewById(R.id.ImageButton1).setImageResource(android.R.drawable.expander_ic_maximized)
It's simple. Find the name of your desired icon (e.g., ic_menu_preferences
), and paste it into your XML.
For example, to show the settings icon in the option menu, your XML should be:
android:icon="@android:drawable/ic_menu_preferences"
That's it. No need to copy to drawable folder. Whenever you write :
sign after android
, it addresses system resources.