Could anyone tell me how to start new line with space for next line in Html.fromHtml
for text view in android?
I used <br>
tag for next line; I can't achieve to give space because
will not support in Html.fromHtml
. can aybody tell is ther any other way to achieve this?
Did you try <br/>
, <br><br/>
or simply \n
? <br>
should be supported according to this source, though.
use <br/>
tag
Example:
<string name="copyright"><b>@</b> 2014 <br/>
Corporation.<br/>
<i>All rights reserved.</i></string>
Enclose your text in
--Here-- with the space you want in new line.
save it in a String variable then pass it in Html.fromHtml().
<br>
worked for me.
simply add + "<br />" +
is enough for a line break
Source: Stackoverflow.com