首先需要下载需要的字体,然后将字体文件ww.ttf放到Android工程assets下,具体路径是assets/fonts/ww.ttf
再添加如下Java代码即可
TextView tv1 = (TextView)findViewById(R.id.testfont1);
Typeface face1 = Typeface.createFromAsset (getAssets() ,"fonts/ww.TTF");
tv1.setTypeface (face1);
首先需要下载需要的字体,然后将字体文件ww.ttf放到Android工程assets下,具体路径是assets/fonts/ww.ttf
再添加如下Java代码即可
TextView tv1 = (TextView)findViewById(R.id.testfont1);
Typeface face1 = Typeface.createFromAsset (getAssets() ,"fonts/ww.TTF");
tv1.setTypeface (face1);