Skip to content Skip to sidebar Skip to footer

Monodroid Transparent Webview

I'm trying to re-write a java android app into monodroid, however I have come across an issue with the background transparency of the webview that I use to display the contents of

Solution 1:

It looks like the value for Android.Resource.Color.Transparent is wrong.

Try:

webView.SetBackgroundColor(0);

or:

webView.SetBackgroundColor(newColor (0, 0, 0, 0));

Update:

Actually, the issue is you are using Android.Resource.Color.Transparent instead of Android.Graphics.Color.Transparent. Resource is a resource id, not a color.

Having said that, Android.Graphics.Color.Transparent doesn't work either. It's encoded as 0xFFFFFF00 which apparently isn't transparent for Android. I've switched it to 0x00000000 for the next release.

The code above will work for now.

Post a Comment for "Monodroid Transparent Webview"