else {
            tvGouMaiRenShu.setVisibility(View.VISIBLE);
            tvGouMaiRenShu
                    .setText(Html
                            .fromHtml("剩余<font size='9' color='#58bbed' ><big>&nbsp;&nbsp;&nbsp;"
                                    + goodsNum
                                    + "</big></font>"
                                    + "&nbsp;&nbsp;&nbsp;张"));
        }

 

效果如下图:

TextView 在java中使用Html设置字体大小颜色

相关文章:

  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
猜你喜欢
  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案