Android Webview not showing full Table

Viewed 47

My html string contain this code.

<html>
<head><style>table, th, td {border: 1px solid black;border-collapse: collapse;}td{padding-left: 2%;}</style></head>
 <body>
   <table>
    <tr><td>Name</td> <td><strong>MUAHAMMAD TAHIR SAEED S/O MUHAMMAD SAEED</strong></td></tr>
    <tr><td>Address</td> <td><strong>111/C AL-REHMAN GARDEN LAHORE </strong></td></tr>
    <tr><td>Due Date</td> <td><strong>01 DEC 21</strong></td></tr>
    <tr><td><p><font color="#0000FF">Bill Amount</font></p></td> <td><strong>5137</strong></td></tr>
    <tr><td><font color="#FF0000">Bill Amount After Due Date</font></td> <td><strong>5460</strong></td></tr>
   </table>
 </body>
</html>

I am using webview to show result of this html code.

webpage.setWebViewClient(new WebViewClient());
        webpage.getSettings().setJavaScriptEnabled(true);
        webpage.loadData(html,"text/html","UTF-8");

This is working correctly in emulator. But in device this webview shows only three rows. why?

0 Answers
Related