0
点赞
收藏
分享

微信扫一扫

代码加载字体以及使用asset中的文件

倪雅各 2023-06-20 阅读 67


AssetManager manager=this.getAssets();
try
{
manager.open("tahoma.ttf");
TextView tv=(TextView)this.findViewById(R.id.testMe);
tv.setTypeface(Typeface.createFromAsset(manager, "tahoma.ttf"));
tv.setTextSize(50f);
tv.setText(ArabicUtilities.reshape("adsdads الحمد لله asdad"));
}catch(Exception ex){
//TODO
}

 

举报

相关推荐

0 条评论