Skip to content

Instantly share code, notes, and snippets.

@jezinka
Created April 19, 2017 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jezinka/2333c778e1dad0047da184d412e2a9e4 to your computer and use it in GitHub Desktop.
Save jezinka/2333c778e1dad0047da184d412e2a9e4 to your computer and use it in GitHub Desktop.
@SuppressWarnings("deprecation")
private Spanned getDSPMessage() {
String html = "Aplikacja została stworzona na potrzeby konkursu <a href=\"http://dajsiepoznac.pl\">DSP 2017</a>";
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
return Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY);
} else {
return Html.fromHtml(html);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment