机器人的WebView风格背景色:在Android 2.2的透明忽略 [英] Android WebView style background-color:transparent ignored on android 2.2

查看:184
本文介绍了机器人的WebView风格背景色:在Android 2.2的透明忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我努力创建具有透明背景的WebView。

I'm struggling to create a WebView with transparent background.

webView.setBackgroundColor(0x00FFFFFF);
webView.setBackgroundDrawable(myDrawable);

然后我打开一个HTML页面

Then I load a html page with

<body style="background-color:transparent;" ...

web视图的背景颜色是透明的,但只要在页面加载,它是由一个黑色的背景从HTML页面覆盖。这只是发生在Android 2.2,它适用于Android 2.1系统。

The background color of the WebView is transparent but as soon as the page is loaded, it's overwritten by a black background from the html page. This only happens on android 2.2, it works on android 2.1.

那么,有没有东西在HTML页面code加入,使之真正透明?

So is there something to add in the html page code to make it really transparent ?

推荐答案

其实这是一个错误,没有人找到了一个解决办法为止。一个问题已创建。该缺陷还是要在蜂窝。

Actually it's a bug and nobody found a workaround so far. An issue has been created. The bug is still here in honeycomb.

请明星,如果你认为这是很重要的:<一href="http://$c$c.google.com/p/android/issues/detail?id=14749">http://$c$c.google.com/p/android/issues/detail?id=14749

Please star it if you think it's important : http://code.google.com/p/android/issues/detail?id=14749

这篇关于机器人的WebView风格背景色:在Android 2.2的透明忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆