开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜