Where can I find hamburger icon drawable? - android

Where can I find hamburger icon drawable ? Is it present in Android SDK or some Support library ? What is icon drawable id if it is present somewhere mentioned above?

Take a look at this answer.
Every SDK contains its own package of relevant drawables so you should try and look it up in the relevant SDK. I think it's ICS(Android v4.0).

Related

AndroidStudio Adding an image to draw with srcCompat

I am trying to do a drawer activity with Android Studio and I'm wanting to personalize the icons used. I've downloaded the icons I want to use and for the most part, it's okay.
In fact, I can modify all the android:icon icons but I have no idea how to modify the app:srcCompat icons. I don't know how to detect the image I want to use in this case...
Do you know how I can do it? Could you explain this to me?
Thanks a lot!
Edit: The file I'm working on as a base is the generated project with Drawer activity as the main activity. For example, if I wanted to modify the icon in the nav_header_main.xml file, how could I do to have my image (.png) transformed in a way detected by Android Studio as compatible with srcCompat
Ensure your image file is in res/drawable folder(or drawable-xhdpi/xxhdpi, determined by your design)
Refer it by app:srcCompact="#drawable/$IMAGE_FILE_NAME" in your xml.
Then you should see what you want.
Please check the doc to further understand the official usage.
Well... I was blind! I was wondering how I could add my icons but they were, I was just mistaking on the address... #android:drawable/... is obviously not #drawable/... but I didn't notice. So be aware that there is a difference and it'll be okay I think!

How to change icon colors in android studio

I downloaded some icons from material.io but they only offer the icons in black. I saw a youtube video where they use to allow you to choose the color. Anyway, I am trying to change the colors of the icons to white. I am not having any luck. I tried to change the fill color in android studio but it doesn't work. Any assistance would be appreciated such as exact code and files to add the code to. Thanks.
simply you can use
android:tint="#android:color/white"
You can directly download these images in Android Studio.
res > right click > New > Image Asset and select
Icon Type : Action Bar and Tab Icones
Asset Type : Clip Art
Theme : CUSTOM
And you can select any clip art that you want, select the color, padding, etc ...
As mentioned before, the material.io icons can be downloaded directly with Android Studio. This solution shows the importing of vector asset icons which are easier to manage since they are stored in a single location (res/drawable) vs. image assets that will have each icon stored in specific density folders (hdpi, xhdpi, etc).
expand the "res" folder
right click drawable
hover over "new"
select "Vector Asset"
click the image next to "icon"
select desired material.io icon
Name the icon what you would like
select "next"
Now you will have two options of setting the icon color
In the layout by using the android:tint attribute of an ImageView. This is my preference because the icon can be viewed prior to runtime.
or
In Java.
imageView.setColorFilter(ContextCompat.getColor(context, android.R.color.white),
PorterDuff.Mode.MULTIPLY);
https://material.io/icons/ actually does let you download icons in white.
But, depending on what exactly you want to do, there are a few options. If you simply want white icons (and not to change them at runtime), you may find this plugin for Android Studio useful: https://github.com/konifar/android-material-design-icon-generator-plugin
It allows you to generate the material design icons right in Android Studio, in whatever color you want. Another alternative for downloading these icons in different colors is https://materialdesignicons.com/.
If you do want to color the icons at runtime, try something like this:
imageView.setColorFilter(ContextCompat.getColor(context, android.R.color.white),
PorterDuff.Mode.MULTIPLY);
You can download white icons from material.io. also look at themes and theme overlays
Instead of android:src
I use attribute android:foreground
android:foreground="#drawable/ic_add"
For those not getting what they want yet try changing the PorterDuff mode, the following is what did it for me
imageView.setColorFilter(ContextCompat.getColor(context, android.R.color.white),
PorterDuff.Mode.SRC_ATOP);
maybe
app:iconTint help you, I am writing this because of the following reference.
Material Design 3

Android Up Indicator Icon

This may be silly but I've been looking over an hour for the Up Indicator icon so I can customize it in my image editor tool. Where can I find that icon? It is not in the Android Design Icon Pack, as I just searched in it.
If you have SDK installed on your device, you can find the icon in %SDK-FOLDER%/platforms/android-*/data/res/drawable-*/ic_ab_back_holo_light_am . You can take from there and edit it.
Try this one: http://romannurik.github.io/AndroidAssetStudio/index.html
It has many other icons not only the up button. You can also change the icon color if you want.
My original answer called out that the icon exists in Android by default and that it does not to be manually added.
But this did not address the question as asked.
You should be able to get the icon from the Android libraries themselves, or from Google material design icon back available here (https://material.io/tools/icons/?icon=arrow_back&style=baseline)

Where can I get the Android ICS menu button icon?

I take two days searching the ICS menu's icon, but I don't find it in anyplace. It's the icon that appear on the photo's right corner, I've downloaded the ics's icon set but nothing, it's not include. Do you have it? Where can I download it? Or I have to make the icon? Thanks a lot!
You can find those icon's from your Android SDK directory. for example if you have your Android SDK in D:** means, you can find from this path **D:\android-sdk-windows\platforms\android-8\data\res\drawable-mdpi . and then you can add ICS icon's like this in your xml file android:icon="#android:drawable/ic_menu_search".
hope this one may helps you.

Styled Toggle Buttons in Android

I was reading the tutorial on Styling the Android toggle button here. The author asks us to create the 9patch drawable for both. I have trying to do this all morning, but have not been able to. Could anyone share the images with me, or tell me where i can get them ?
Kind Regards
You can find the 9patch drawable tool in the SDK folder in the tools folder.
It's a very useful tool for creating 9patch images, and you should be able to make your toggle button with it
There are links to 9-patches here: https://stackoverflow.com/a/15640365/2066079
The ones provided will style your togglebuttons to look like switches (which are only available in v14+)

Categories

Resources