how to change the font on the text view in android?
I tried a lot to set font for the TextView in my app. But there is no way seems to set font in android. I want to set Arial font for all of my TextView through xml. I added Arial.ttf to my assets still unable to set style in xml. Please find me a way out.
AFAIK you can’t do it in xml, you have to do it in code:
Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/Arial.otf"); TextView tv = (TextView) findViewById(R.id.CustomFontText); tv.setTypeface(tf)