Font Awesome:
Font Awesome gives you scalable vector icons that can instantly be customized — size, color, drop shadow, and anything that can be done with the power of CSS.
Use in Android:
Font Awesome seems to be working fine for me in Android Application.Do you complete following steps:
Font Awesome gives you scalable vector icons that can instantly be customized — size, color, drop shadow, and anything that can be done with the power of CSS.
Use in Android:
Font Awesome seems to be working fine for me in Android Application.Do you complete following steps:
- Copied
fontawesome-webfont.ttf
into my assests folder - Found the character entities for icons I wanted, using this page: http://fortawesome.github.io/Font-Awesome/cheatsheet/
- Created an entry in strings.xml for each icon. Eg for a heart:
<string name="icon_heart"></string>
- Referenced said entry in the view of my xml layout or programmatically:
<Button android:id="@+id/like" style="?android:attr/buttonStyleSmall" ... android:text="@string/icon_heart" />
OR
button.setText((R.string.icon_heart
));- Loaded the font in my onCreate method and set it for the appropriate Views:
Typeface font = Typeface.createFromAsset( getAssets(), "fontawesome-webfont.ttf" ); ... Button button = (Button)findViewById( R.id.like ); button.setTypeface(font);
Watch NFL Live Stream
ReplyDeleteWatch NFL Live Stream
Watch NFL Live Stream
Watch NFL Live Stream
Watch NFL Live Stream
Watch NFL Live Stream
Great article and thanks for sharing your article In article tips are very useful to me php developer london
ReplyDeleteHi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here.
ReplyDeleteKindly keep blogging. If anyone wants to become a Front end developer learn from
https://www.anikadigital.com/
Thanks
Web Development Company In India
ReplyDelete