Applying a system font to a TextView

suggest change

In the following code, replace fontsname with the file name of the font you want 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