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));
    }

 

posted on 2017-01-13 14:26  放纵的卡尔  阅读(9196)  评论(0编辑  收藏  举报

导航