当前位置: 代码迷 >> Android >> Android 中字体的处置
  详细解决方案

Android 中字体的处置

热度:27   发布时间:2016-04-28 04:42:39.0
Android 中字体的处理
//得到TextView控件对象        TextView textView = (TextView)findViewById(R.id.custom);         //将字体文件保存在assets/fonts/目录下,创建Typeface对象        Typeface typeFace = Typeface.createFromAsset(getAssets(), "fonts/HandmadeTypewriter.ttf");         //应用字体        textView.setTypeface(typeFace);

  相关解决方案