I want to set a background image for a webview in android.
I did the following:

```
webView.setBackgroundColor(0);
webView.setBackgroundResource(R.drawable.backgroundImage);

```

I want the image to be in the middle of the webview. Any help please?

**EDIT**
I have found the solution:

```
linearLayout.setGravity(Gravity.CENTER);
imageView.setBackgroundResource(R.drawable.backgroundImage);
linearLayout.addView(imageView);
frameLayout.addView(linearLayout);
frameLayout.addView(webView);

```