android: show font icon as a sequence of number string -
i want put font-awesome
icon inside textview
text. after set text, android shows me string sequence instead of font-icon.
my code is:
string formatedsection = formatedsection + sections.get(i).getcontent() +getresources().getstring(r.string.icon_ref);
i define icon_ref in string.xml below:
<string name="icon_ref"></string>
i followed these instructions add font-icon. doing wrong?
if did step 5 in short guid problem seem forget there diff between java , xml.
in xml use xml escape (&...;), in java you'll have use java escape (\u...). – biffen may 20 @ 10:10
try hard code string "\uf075" , work charm.
Comments
Post a Comment