I have the following string defined in strings.xml
<string name="InfoLong"><b>%1$s\%</b><br/>Tie:%2$s\%<br/>Win%3$s\%</
string>
and in my code:
String FormatStr = getResources().getString(R.string.InfoLong);
String resultsText = String.format( FormatStr, ---, "--", "---"
);
CharSequence str = Html.fromHtml(resultsText);
percent.setText( str );
what I would like to get is:
---%
Tie:--% Win:---%
what I get is:
--%<br/>Tie:--%Win:---%
I have also tried \n and \\n instead of <br/> with similar results
My question is:
Can I embed a newline in a format string?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en