ITeye博客

android中添加arial字体(非android默认字体)

Clareshao · 2012-02-15 17:04 · android_日常积累 · 移动开发 · Markdown

先在工程中添加字体文件,位置为assets/font/arial.ttf,文件见附件


TextView nameTextView = (TextView) convertView.findViewById(R.id.name);
        Typeface tf = Typeface.createFromAsset(context.getAssets(), "font/arial.ttf"); 
        nameTextView.setTypeface(tf);  

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。