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


B4X:
    '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: 216
  • API8.jpg
    API8.jpg
    8 KB · Views: 200
Last edited:

warwound

Expert
Licensed User
Longtime User
First thing i'd do is validate your HTML.

Dump the HTML to a file on the device first:

B4X:
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

alienhunter

Active Member
Licensed User
Longtime User
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
Top