J'ai eu le même problème avec 2.2 et aussi dans 2.3. J'ai résolu le problème en donnant l'alpa valeur html pas dans android. J'ai essayé beaucoup de choses et que j'ai trouvé est - setBackgroundColor();
couleur ne fonctionne pas avec la valeur alpha. webView.setBackgroundColor(Color.argb(128, 0, 0, 0));
ne fonctionnera pas.
voici donc ma solution a fonctionné pour moi.
String webData = StringHelper.addSlashes("<!DOCTYPE html><head> <meta http-equiv=\"Content-Type\" " +
"content=\"text/html; charset=utf-8\"> </head><body><div style=\"background-color: rgba(10,10,10,0.5); " +
"padding: 20px; height: 260px; border-radius: 8px;\"> $$$ Content Goes Here ! $$$ </div> </body></html>");
Et en Java,
webView = (WebView) findViewById(R.id.webview);
webView.setBackgroundColor(0);
webView.loadData(webData, "text/html", "UTF-8");
Et voici la Sortie capture d'écran ci-dessous.![enter image description here]()