Android Show HTML Bulleted List from strings.xml

If you search on the internet about how to show a bulleted list from strings.xml using HTML tags, most of the answers will say that you should use a WebView, or to use the bullet symbol directly, or other alternatives. And on some posts I even read that you can’t use <li> tag from HTML because it is not recognized in Android. This is totally untrue. Here, in this post you can see all the HTML tags which are supported and which are NOT supported. I tried them all ๐Ÿ™‚

Below I will show you how I used <li> tag in order to show a bulleted list from strings.xml.

strings.xml

activity_main.xml

Activity

 

And below is the result ๐Ÿ™‚

As you can see, is pretty easy to show a bulleted list if you need to show it on a TextView. So there’s no need to refactor your code to use WebView or other alternatives. Of course, if you don’t like this approach, you can use the others. I don’t want to imply this the correct and only way to show bullets. But I wanted to write this post, because I didn’t find this approach anywhere else and maybe someone will need it, or like it more than the other ones :P.

Please let me know if you find this post useful by writing a comment or rating it. Also don’t forget to share it if you liked it ๐Ÿ˜‰