Short explanation about this website. The complete set of 744 icons in Material Design Iconic Font. You find these icons here: http://zavoloklom.github.io/material.
How can I use material fonts and icons locally, because I have not always access to the internet to reference it through http.Can anybody help me?
3 Answers
According to their guide you can download icons as svg
and png
, as well as download the icon fonts themselves and implementing them like so:
The you can use them without an internet connection:
jdepyperejdepypereThe icons are available for download from https://www.google.com/design/icons/
The Material Design font for western languages is all Roboto, which are Google fonts. Those are downloadable, too, from many places.
In my app there are a lot of places where i have to programmatically add icons into my textviews.
On the Android material design website i saw, that you can use icon fonts, but there is nothing that indicates that you can do this inside an android app, lose from the png and svg icons itself.
http://google.github.io/material-design-icons/
is it possible to use icon-fonts in android? and if it is possible how do i implemented this into my app?can someone help me with this?.
3 Answers
You could have a look at the Android-Ionics library: https://github.com/mikepenz/Android-Iconics
It has many built-in fonts including the Material Design Icon Font and can be used for ImageViews, TextViews and Buttons.
Apart from that you can use the Material Design Icon Font like any other font:
- Download .ttf file and save it under main/assets/fonts
Define strings for the unicode values you need, e.g. something like
Load typeface in your application and set typeface for textview
- Use string myicon as text in your textview
Material Design Icon Font Download For Mac Download
With the latest version of the Android Studio, you can now generate the Material icon by
- 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.
Vector images can also be generated by selecting vector image option
More information about vector assets can be found here https://developer.android.com/studio/write/vector-asset-studio
Unfortunately I can't find built-in solution for this, but you can check this samples with external libs