I am trying to do a application-wide font change and creating a style file to do so. In this file (below) I just want to change typeface value of TextAppearance style of And
You Have just make Public calls And attached Method like this
public class TextViewFontType {
public Typeface typeface;
public void fontTextView(final TextView textView, final String fonttype) {
typeface = Typeface.createFromAsset(textView.getContext().getAssets(), fonttype);
textView.setTypeface(typeface);
}
have you use any where method TextView set font-family.
public class FontList {
public static final String gothicbNormal="fonts/gothicb.ttf";
public static final String gothicbBold="fonts/gothicb.ttf";
}
made FontList calss after you have just call methods any where with pass two parameter.