Created
July 10, 2017 08:51
-
-
Save mtrakal/e064179b570c2a9dfe2d92b662c99af3 to your computer and use it in GitHub Desktop.
Android html tags and variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private TextView text; | |
... | |
text.setText(Html.fromHtml(getString(R.string.html_with_variable, "Some variable"))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<string name="html_with_variable"><![CDATA[<b>Your variable:</b> %1$s]]></string> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment