Recently, I have been implementing a web application on Android. I want to make the background color of the web browser Transparent .
Search, I found that there are two lines for Webview.
newWebView.setBackgroundColor(0x00000000);
newWebView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
It works for Android version 4.0 ~ 4.3, but does not work for 4.4 KITKAT.
I got only a white background. Add, when I set the background color to black, as shown below:
newWebView.setBackgroundColor(Color.BLACK);
I also saw a white background. Does anyone know a solution?
source
share