java - How to integrate a special font (.ttf) in an Android application? -


i want add file .ttf able customize font of textview in application.

i wonder how exploited?

i download file on dafont.

thank in advance help!

first, copy font /assets folder in project, set typeface of textview, can following:

typeface myfont = typeface.createfromasset(getassets(), "dafont.ttf"); mytextview.settypeface(myfont); 

edit: corrected directory


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -