How to transparent Android WebView


First of all you have to make a transparent background in html code:

String webData = StringHelper.addSlashes("<!DOCTYPE html>
<meta http-equiv=\"Content-Type\" " +
 "content=\"text/html; charset=utf-8\"> 
<div style=\"background-color: rgba(0,0,0,1.0); ">
 your webpage details...

and then:

webView = (WebView) findViewById(;
webView.loadData(webData, "text/html", "UTF-8");

Leave a Reply

Your email address will not be published. Required fields are marked *