On using external font in android my Application closes autometically
I am trying external font in my application but Application crash automatically.
I am using the code
Typeface face;
face = Typeface.createFromAsset(getAssets(), "font.otf");
textview.setTypeface(face);
its working but if i switch this activity more frequently then it crashes..
Give m开发者_Go百科e solution....
Please help me...
Enclose this code in try { } catch { }
block and see what exception it throws. This will help you a lot.
Also you can just run the app in debug mode and when it crashes, you will see the e
var in the variables tab.
精彩评论