Skip to content

Instantly share code, notes, and snippets.

@alfredmyers
Created February 6, 2018 23:58
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 alfredmyers/898c020970bc85503580933876e33a05 to your computer and use it in GitHub Desktop.
Save alfredmyers/898c020970bc85503580933876e33a05 to your computer and use it in GitHub Desktop.
private ISpanned FromHtml(string source)
{
// app specific code
if (Build.VERSION.SdkInt >= BuildVersionCodes.N)
{
return Html.FromHtml(source, FromHtmlOptions.ModeLegacy);
}
#pragma warning disable CS0618 // Type or member is obsolete
return Html.FromHtml(source);
#pragma warning restore CS0618 // Type or member is obsolete
}
private ISpanned FromHtml(string source)
{
// app specific code
return Html.FromHtml(source);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment