tinyclear

Android;设置TextView加粗 代码设置

我用过paint的那种方式,不好使.

 private void setTextBold(TextView textView) {
        //android中为textview动态设置字体为粗体
        textView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
    }

    private void setTextUnBold(TextView textView) {
        //设置不为加粗
        textView.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));
    }

 

分类:

技术点:

相关文章:

  • 2021-07-10
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2021-05-10
猜你喜欢
  • 2021-11-27
  • 2022-12-23
  • 2022-01-29
  • 2021-06-14
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案