How to use Android-provided graphics in an application? - android

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?

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.

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

Related

Where is #android:drawable looking for?

When I try to use default Android icons, I use:
android:icon="#android:drawable/ic_"
And on Android Studio, if I hit ctrl-space, I get a list of availables ic_ icons.
I suppose they come from android-sdks folder but, if yes, where exactly?
As my targetSdkVersion="22", I supposed I could find these icons, and add more ones from https://github.com/google/material-design-icons, in android-sdks/platforms/android-22/data/res/, where I can find drawable-xhdpi and all others, but obviously, it doesn't seem to be the case.
http://google.github.io/material-design-icons/#icons-for-android doesn't help me much on how to use it.
Any help?
I suppose they come from android-sdks folder but, if yes, where exactly?
The IDE code-completion hopefully comes from what is in android.R.drawable for the compileSdkVersion you are using. The actual images can be found in $ANDROID_SDK/platforms/$VERSION/data/res/, where $ANDROID_SDK is wherever your Android SDK is installed and $VERSION is a directory based on your compileSdkVersion (e.g., android-22).

Android: What is the bin/res/crunch folder used for?

While modifying a white label app, I needed to change a logo and found it was located in 2 locations (duplicated):
res/drawable and similar folders (for other screen depths)
bin/res/crunch/drawable and similar folders (for other screen depths)
So I would like to know if I should care about the second folder, or if it's something generated by Eclipse/ADT.
They are automatically generated on build. You can ignore them.
The crunch is used to export the app by eclipse and I've experienced a problem that a drawable was not updated in a crunch. If you want to be really sure that you deliver what you see, just clean the res/crunch/drawable before exporting.
Based on my experience, i believe that this is because of import from one machine to another one. (mostly, like 64-bit to 32-bit)
Just delete the folder crunch... activity will run fine.

Is there such thing as system images available in Android?

I'd like to use basic images like the ones in the menu of the alarm application. Are these images integrated in the Android SDK ? I didn't find any way to access them.
If not, do you know a good free library ?
Thanks in advance,
Regards,
C.Hamel
http://www.darshancomputing.com/android/1.5-drawables.html is your answer
and than you access like this android:icon="#android:drawable/ic_menu_delete"
if you want to use image of android system then you can use that all image which are in android's system..
you just need to write android.R.drawable and you will get all image ...
android.R.drawable.btn_dialog
Look in your android-sdk folder, you will find folders for each version of android including all the system images. You can copy the images you need to your own ressource folder and use them from there.

Android vector graphics icon set

Anyone have a handy link where I can download the full Android vector-based icon set?
They're not super well organized, but you may already have them in your android-sdk/ directory (assuming you've downloaded your Android docs locally through your AVD Mannager).
Either in your:
docs/shareables/
icon_templates-v1.0/
icon_templates-v2.0/
sample_images/
search_icons/
(they all seem to be in Adobe Photoshop .psd format
stored in different layers)
or in your
docs/assets/images/
For their appendix, take a look at the local copy of your docs (here is the online copy)
docs/guide/practices/ui_guidelines/icon_design.html
would this be what you are looking for
http://www.matcheck.cz/androidguipsd/

Drawable resources and NetBeans (Android Development)

I'm newer in android development. And after using eclipse about 1 month... i hate this. I've setup NetBeans IDE for android development. It's fast, it's looks like cool and i like it. But have one trouble. I cant find how to use drawable resources (just like R.drawable.icon) :( . Can anyone help me?
PS: sry 4 my english
Use the file browser on the left hand side in NetBeans to open
YourProjectName -> res -> drawable and you will find your drawable files here. Also, Android provides different drawable folders to support multiple screen sizes, i.e : drawable-hdpi, drawable-xhdpi, drawable-mdpi. These are great if you wish to support your app on multiple screen sizes and don't want to scale the images using code (it makes them look ugly). Then you can just place different sizes of the same drawable image in these folders and android will automatically figure out which one to use!
Your English is quite decent in comparison to some of the drivel people post here.
This is simpler with updated version of NBAndroid (including NBAndroid Extensions). See some comments at http://www.nbandroid.org/2013/04/tuning-hyperlink-navigation.html

Categories

Resources