Unable to use android rectifier?

I am trying to use one of the Spinner backlinks (spinner_black_16, spinner_black_20, spinner_black_48 or spinner_black_76) as shown on this page . My project uses the SDK 2.1, so I upgraded it to version 2.2, as this page contains the version of the SDK in which they are included. Unfortunately, none of them android.R.drawable.spinner_black_xxappear to be defined.

Are these drawings inaccessible for use by developers? The only other way that I seem to be able to access them is with the following method:

final Drawable spinner = new ProgressBar(context).getIndeterminateDrawable();

Unfortunately, this gives me a white counter, not a black one.

+5
source share
1 answer

The best way to access these drawings is to copy them from the SDK directory to your project, and then access them, like any other resources.

Allotments are in $ANDROID_SDK_DIR/platforms/android-*/data/res/drawable-*/. You can download and select the OS version from which you want to pull out the drawings. API level 7 / OS version 2.1 has the full complement:

platforms/android-7/data/res/drawable-mdpi/spinner_black_16.png
platforms/android-7/data/res/drawable-mdpi/spinner_black_20.png
platforms/android-7/data/res/drawable-mdpi/spinner_black_48.png
platforms/android-7/data/res/drawable-mdpi/spinner_black_76.png
platforms/android-7/data/res/drawable-hdpi/spinner_black_16.png
platforms/android-7/data/res/drawable-hdpi/spinner_black_20.png
platforms/android-7/data/res/drawable-hdpi/spinner_black_48.png
platforms/android-7/data/res/drawable-hdpi/spinner_black_76.png

Although the official β€œOfficial Android Icon Design Guide” is currently used to explicitly address this situation , it recommends copying:

, , Android ( android.R.drawable). , , . , , .

+1

All Articles