logo
  • 教程列表
  • SO官方文檔
  • 獲取系統字型名稱並使用字型
    • 獲取系統字型名稱
    • 將系統字型應用於 TextView
  1. StackOverflow 文件
  2. Android 教程
  3. 獲取系統字型名稱並使用字型
  4. 將系統字型應用於 TextView

將系統字型應用於 TextView

Created: November-22, 2018

在以下程式碼中,你需要將 fontsname 替換為你要使用的字型名稱:

TextView lblexample = (TextView) findViewById(R.id.lblexample);
lblexample.setTypeface(Typeface.createFromFile("/system/fonts/" + "fontsname" + ".ttf"));
  • 獲取系統字型名稱

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明