Android Display HTML in a ListView

后端 未结 9 2076
情话喂你
情话喂你 2020-12-16 05:54

Sorry if this is obvious to everyone else but I am having a minor difficulty understanding how to display html inside my listview.

My list view is declared.

9条回答
  •  既然无缘
    2020-12-16 05:58

    If you have the possibility of loading your texts from strings.xml, adding the tag there will automatically bold your text. If however your texts are dynamic, you will have to create a custom adapter, and in it to set the text using textView.setText(Html.fromHtml(yourText));

提交回复
热议问题