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 -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -