You don't have to do those nasty little icons anymore!
Find some information from the Internet, summarize the method of using Fontawesome on Android.
1. Download the resource bundle to the official website, locate the font file Fontawesome-webfont.ttf, and copy it into the assets of the program, in fact, this step is the same as using other fonts.
2.http://fontawesome.io/cheatsheet/to this site to query the Unicode of the icons you need.
3. You can create a subclass of TextView to set the font style uniformly, the code is as follows
Public class Fontawesometextview extends TextView { public Fontawesometextview (context context, AttributeSet attrs) { Super (context, attrs); = Typeface.createfromasset (context.getassets (), "Fontawesome-webfont.ttf " ); This . Settypeface (font); }}
4. Replace TextView with a custom class in the XML you need
5. Set the content of the corresponding TextView
Call_icon_view.settext (html.fromhtml ("& #xf095; "));
Note that this cannot be directly set to "& #xf095;", need to use Html.fromhtml ("& #xf095;"), the underlying cause to study!
Using Fontawesome on Android