I'm trying to change the font of my Text View Using a typeface like this
Typeface tf = Typeface.createFromAsset(context.getAssets(), "fontName.ttf"));
TextView textView = (TextView) findViewById(R.id.textView1);
textView.setTypeface(tf);
but Huawei device has a font style customing that if you change the font there it will change the entire device font including my textView as well How can I prevent this?
If you are using
fontFamilyortypefaceattributes in xml, remove theme. Also you can use Calligraphy project that enables actually setting custom font directly from a layout xml.