I'm currently using an Android WebView to load a local HTML file that scales an image as the background. However, I encountered a brief white screen flash before the image loads when launching the activity with the WebView. Though it's not a major issue, I'd prefer to eliminate it if possible. I attempted setting the background of all related elements to black, but the flash still occurs. Any suggestions on how to resolve this?
Here is 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>
And here is 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>