sketchub icon

HTML content in WebView

CoCoCo_CoCoCo
3 Likes
7 Comments
46 Downloads

Screenshots

About

  • ID: webview1 to simpleWebView

  • onCreate: add New variable ( String) = content

<h1>Heading 1</h1>\n" + " <h2>Heading 2</h2>\n" + " <p>This is some html. Look, here\'s an <u>underline</u>.</p>\n" + " <p>Look, this is <em>emphasized.</em> And here\'s some <b>bold</b>.</p>\n" + " <p>Here are UL list items:\n" + " <ul>\n" + " <li>One</li>\n" + " <li>Two</li>\n" + " <li>Three</li>\n" + " </ul>\n" + " <p>Here are OL list items:\n" + " <ol>\n" + " <li>One</li>\n" + " <li>Two</li>\n" + " <li>Three</li>\n" + " </ol>

  • add source directly:

simpleWebView.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);

©2024 Sketchub | User Policy