I am using a WebView in Android to load some local html that scales an image to the screen as a background... however, when I go to start the activity that loads the WebView I get a very brief flash of white screen before the image loads. It is not a huge deal, but I would like to avoid this... I have tried setting the background of all the related elements to black, but it still happens... any ideas?
Here's my html:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>NerdRAGE</title>
<style>
* { margin: 0; padding: 0; }
html {
background: url(images/10_1.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
</head>
<body bgcolor="#000000">
</body>
</html>
Here's my XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="#000000" android:layout_width="fill_parent" android:layout_height="fill_parent">
<WebView
android:id="@+id/mapview"
android:background="#000000" android:scaleType="centerInside" android:layout_gravity="center_vertical|center_horizontal" android:clickable="false" android:fitsSystemWindows="true" android:scrollbars="none" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
</LinearLayout>