How to add bulleted list to android application?

后端 未结 17 1399
抹茶落季
抹茶落季 2020-11-29 19:14

I have googled my question but there is not working answer provided. How do add a bulleted list to my textview.

17条回答
  •  佛祖请我去吃肉
    2020-11-29 19:46

    Tough to do as ul/li/ol are not supported. Fortunately you can use this as syntactic sugar:

    • foo
    • bar
    • baz

    is the html entity for a list bullet more choices are here http://www.elizabethcastro.com/html/extras/entities.html

    more about which tags are supported provided by Mark Murphy (@CommonsWare) http://commonsware.com/blog/Android/2010/05/26/html-tags-supported-by-textview.html Load that up with Html.fromHtml

    ((TextView)findViewById(R.id.my_text_view)).setText(Html.fromHtml(myHtmlString));
    

提交回复
热议问题