android string.xml reading html tags problem

前端 未结 4 1380
栀梦
栀梦 2020-11-29 03:44

In Android project\'s strings.xml file i have following html text







        
4条回答
  •  抹茶落季
    2020-11-29 04:15

    i've run into the same problem by trying to store a complete htmlpage in my rescources. I finaly solved the problem by changing three things:

    1. the "string" node needs to have set the "formatted" attribute to false.
    2. the stored html page needs to be wrapped in a CData node.
    3. the html page is NOT alowed to contain apostrophes!

    The last one actualy was my main problem. So here is my strings.xml containing the "properly" stored html page.

    
    
        Error
    ]]>

提交回复
热议问题