Search code examples
androidhtmlandroid-layoutbackground-color

What is the default layout background


I got a WebView that load an HTML file with a text. The problem is that the color inside the html and outside isn't the same. Here is a screenshot:

The Activity With the WebView

The HTML FIle is:

<html dir="rtl">
<head>
    <title>About</title>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type"/>

    <body bgcolor="#FFFFFF">
        <p>This is a Testpp</p>
        <p>See the problem.</p>
         <p>last test:</p>
    </body>
</html>

(If I remove the: bgcolor="#FFFFFF" color stays the same) Thanks!


Solution

  • The default background color for light theme is: #EEEEEE

    Is almost white, but not completely.

    It worked for me, hope its work for you.

    UPDATE: In new versions you could be looking for #FAFAFA