Android Question WebView HTML

alienhunter

Active Member
Licensed User
Longtime User
Hi to All ,

i try to understand why the code below creates in different API different output in a Webview
Tables first line
In API 16 (see jpg ) is off
In API 8 ok

o_O

thanks AH


Code: Copy
    'Tables
    sb.Append("<body>")

    sb.Append("<table border=1>").Append(CRLF)
    sb.Append("<tr>").Append(CRLF)
    sb.Append("<td>Part Number</td").Append(CRLF)
    sb.Append("<td>Part Number1</td").Append(CRLF)
    sb.Append("</tr>").Append(CRLF)
 

Attachments

  • AP16.jpg
    AP16.jpg
    35.9 KB · Views: 413
  • API8.jpg
    API8.jpg
    8 KB · Views: 350
Last edited:
First thing i'd do is validate your HTML.

Dump the HTML to a file on the device first:

Code: Copy
File.WriteString(File.DirRootExternal, "mywebpage.html", sb.ToString)

Now retrieve that file and validate it using one of the many online HTML validators.
Also open the HTML file in a desktop browser - does it render as desired?
Do different desktop browsers render the HTML file differently?

Is the code you posted missing </table></body> or did you simply not post that part of the code?

Create a valid HTML5 web page and i think your problem will be fixed.

Martin.
 
Upvote 0
Thanks Martin,

i forgot about the HTML validators :)
, and yeah i did not post the part of the code ...sorry
i will try it let you know

Alfred
 
Upvote 0
Back
Top