In my Android app, I have to write a line to a file. Before that, I want to format the string in order to make the font bold and have a new text size. So I change string.xml to
"<string name="file_title" ><b>#title*</b></string>",
for bold text and writing to a text file. But it does not appear as bold in the file.
- Is this the correct method that I used to implement the string in bold?
- I also want to know how to resize a string text directly from string.xml
how to add this courage to a file ... i tried
"<string name="note"><![CDATA[<b>title</b>]]></string>"
in java code get a string
yourtextview.setText(Html.fromHtml(getString(R.string.note)));
using texview, it's a bold, exaclty that I want to write to a file using the code below
"bufferWritter.write(String.valueOf(Html.fromHtml(getString(R.string.note))));"
but I donβt see the courage in the print.txt file ...
Thanks and Regards Anoop
source share