trouble beetween (xml and fromHtml)

Discussion in 'Android App Developers' started by anakine54, Aug 28, 2014.

  1. anakine54
    Offline

    anakine54 New Member

    Joined:
    Aug 28, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello
    I do not understand why this code works :

    strVar=" something <b> bold something</b>";
    Spanned marked_up = Html.fromHtml(strVar);

    but not this one's :
    strVar= res.getString(R.string.str_in_xml);
    // (str_in_xml) var defined in the directory res/values/strings.xml the same the other
    Spanned marked_up = Html.fromHtml(strVar);