-1

i have the below html content from some server

<link href=\"http:\/\/TSCC222.nexusonline.ca\/Theme\" +
            "/RenderCSS\\/1246\\\" rel=\\\"stylesheet\\\" \\/><style type=\\\"text\\/css\\\">    " +
            "body {        background-color:#fff;    }    #responsive-content {        padding: 1em 1em;    }   " +
            " #responsive-content div {        width: 99% !important;        display: block !important;        " +
            "text-align: center;    }    img {        float: none !Important;        max-width:99%;        " +
            "height: auto !important;    }<\\/style><div id='responsive-wrapper'><div id='responsive-content'><span style=" +
            "\\\"font-family: Gotham; text-align: center; font-size: 22px;\\\">" +
            "It has corking. " +
            "&nbsp;&nbsp;<br \\/><br \\/>Note that the post lights are part of the shared facility. &nbsp" +
            ";We have notified the sghts will be " +
            "repaired shortly.<br \\/><br \\/>Please exercise additional caution in areas " +
            "that are not well lit.<br \\/><br \\/>Thank you.<\\/span><br style=\\\"font-family: Gotham; " +
            "font-size: medium; text-align: center;\\\" \\/><br style=\\\"font-family: Gotham; font-size: medium; " +
            "text-align: center;\\\" \\/><img alt=\\\"\\\" src=\\\"http:\\/\\/internal.maxtvmedia.com\\/parsers\\/iconfinder\\/" +
            "icons\\/Gnome-Dialog-Information-64.png\\\" style=\\\"cursor: default;\\\" \\" +
            "/><div><br \/><\/div><\/div><\/div>

How to show this html as perfect as web in android. FYI i have used Html.fromhtml() method to encode this, but got no success.

Lakhwinder Singh
  • 6,799
  • 4
  • 25
  • 42

1 Answers1

0

Use WebView .

webView.loadData(String data, 
                String mimeType, 
                String encoding)

method will help you. More info here in this link https://developer.android.com/reference/android/webkit/WebView.html

Febi M Felix
  • 2,799
  • 1
  • 10
  • 13