Why doesn't my text show up with style when using SpannableStringBuilder?

后端 未结 4 1592
清酒与你
清酒与你 2020-12-10 07:16

I have a problem with a SpannableString object.

Below\'s a short example:

SpannableString spanstr = new SpannableString(\"Bold please!\"         


        
4条回答
  •  清歌不尽
    2020-12-10 07:28

    use SpannableStringBuilder instance itself.

    contentView.setText(sb);
    

    output with your code:

    enter image description here

提交回复
热议问题