Where is #android:drawable looking for? - android

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).

Related

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.

How do you change the default subdrectories in an Eclipe ADT project?

I would like to be able to change the default subdirectories created as part of an Eclipse ADT project. That is, instead of "res" and "bin" I would like to have something else.
With most kinds of Eclipse projects it seems pretty straightforward -- there are a few places where you go to change different core subdirectories, you go there and change them, and that's pretty much that.
With the ADT plugin for Eclipse, it seems that if you refactor "res" to "resources" for example a new folder called "res" gets automatically added anyway. The same seems to be true for "bin" and "gen."
Where do I start to look to learn more about what causes this automated behavior and how to change it?
I'm not sure you can, as they are strictly defined by Android
http://developer.android.com/guide/topics/resources/providing-resources.html
http://developer.android.com/guide/topics/resources/available-resources.html
Why do you want to change the names?

How to use Android-provided graphics in an application?

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/

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