I would like to use outlined Material icons in my Android Studio project but I'm not able to find how. I've searched on Google similar questions and only found this unanswered question. I've also searched on the Material Design website, but the "copy" icon doesn't appears in it...
So, how can I use outlined Material icons ?
You can switch to outlined icons in the drop down menu.
Right-click the res > drawable folder in the Explorer area on the left of Android Studio. From the menu that appears, select New > Vector Asset
Related
I want to use the new material icons provided by Google. I find it a bit cumbersome to download each icon individually.
Is there a way to do something like:
<ImageButton
android:src="#android:Icon.Material.IconName"
.../>
If not, whats the easiest way to include multiple icons in my project?
Cheers.
Follow these steps to start Vector Asset Studio:
In Android Studio, open an Android app project.
In the Project window, select the Android view.
Right-click the res folder and select New > Vector Asset.
After you open Vector Asset Studio, you can add a material icon as follows:
Select "Material Icon"
Click Choose
Select a material icon
Checkout if this can be helpful:
https://github.com/google/material-design-icons
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).
I would like to add a delete icon (trashcan) in my actionbar. Is it a default icon can that an app can use or should the icon be a drawable in the app itself?
You can use #android:drawable/ic_menu_delete in your menu XML. This will show the default delete icon across different versions of Android (meaning it will be different on different OS versions). If you want it to be consistent across all versions, you can also download icons from https://github.com/google/material-design-icons and include them in your project drawables folder.
I would very much recommend this icon pack from Google:
https://github.com/google/material-design-icons/releases
It includes their set of Material design icons.
Navigable here:
https://www.google.com/design/icons/
Update:
This repository is extremely useful, with many Google / Custom icons:
https://materialdesignicons.com/
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)
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+)