Android: html in strings.xml

后端 未结 5 1965
谎友^
谎友^ 2020-11-29 21:10

I would like display for example this html code:


    

Hello World

This is a test of the URL &

5条回答
  •  醉话见心
    2020-11-29 21:47

    All the styling supported by the XML resources system is explained in the Android documentation.

    String Resources: Formatting and Styling

    Anything included there can be used and set directly on TextView. If you need to use further HTML markup, you will need to place raw HTML (with escaped characters for <, > and such) into the resource and load the entire thing in a WebView.

提交回复
热议问题