How do I add a bullet symbol in TextView?

后端 未结 9 1130
感动是毒
感动是毒 2020-11-30 17:27

I have a TextView and I want to add a bullet symbol in my text through XML. Is it possible?

9条回答
  •  再見小時候
    2020-11-30 18:19

    You may try BulletSpan as described in Android docs.

    SpannableString string = new SpannableString("Text with\nBullet point");
    string.setSpan(new BulletSpan(40, color, 20), 10, 22, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
    

提交回复
热议问题