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 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!
By default the background colour of html webpage is white.
By default each activity in Android has a white background. To change the background color, first add a new color definition to the colors.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With