1

I had found an answer that we can use bullets in textview by adding u\2022 with the text. Ref : https://stackoverflow.com/a/3429643/4919237

When i added this code through XML it displays fine in TextView

and When i try to display bullet through json it doesnt display bullet ,instead it displays the text u\2022 itself.

my receiving Json format is

{"description":"\\u2022first one\\n\\u2022second one edited\\n"}

please help me to reslove my problem.

Community
  • 1
  • 1
Mr Robot
  • 1,747
  • 6
  • 35
  • 67

2 Answers2

2

At First , You can check Html.fromHtml & remove one \ .

Html.formHtml method takes an Html.TagHandler and an Html.ImageGetter as arguments as well as the text to parse.

YourTextViewObj.setText(Html.fromHtml("Your String"));

FYI

Currently android seems support the following HTML tags to be rendered on TextView.

enter image description here

IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
1

You can set text using Html.fromHtml like

textview.setText(Html.fromHtml(your description));
justDroid
  • 343
  • 2
  • 9