Setting webview background image to a resource graphic in Android

Posted by JamieBennett on Stack Overflow See other posts from Stack Overflow or by JamieBennett
Published on 2009-08-11T13:36:47Z Indexed on 2010/04/29 6:27 UTC
Read the original article Hit count: 313

Filed under:
|
|
|

I'm trying to set the background of a webview to a drawable image resource in Android.

From the sdk it seems something like this would work but it doesn't.

WebView web = (WebView) findViewById(R.id.webView);

web.setBackgroundResource(R.drawable.backgroundmain);
web.loadData(profile, "text/html", "UTF-8");

Any idea's?

© Stack Overflow or respective owner

Related posts about android

Related posts about java