Applying a system font to a TextView

suggest change

In the following code you need to replace fontsname by the name of the font you would like to use:

TextView lblexample = (TextView) findViewById(R.id.lblexample);
lblexample.setTypeface(Typeface.createFromFile("/system/fonts/" + "fontsname" + ".ttf"));

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents