Android WebView background color

前端 未结 8 1843
情话喂你
情话喂你 2020-12-29 00:47

I am adding to my layout a WebView to display justified text. I want to set the background of the WebView to be transparent to appear like a textView. Here\'s what I did:

相关标签:
8条回答
  • 2020-12-29 01:42

    What I do is

     synopsis.setBackgroundColor(0);
    

    Hope it helps!

    0 讨论(0)
  • 2020-12-29 01:43

    Did you load the css in ur webview?

    Something like:

    synopsis.loadData(textTileStyling, "text/html", "UTF-8");
    

    or

    synopsis.loadDataWithBaseURL("", textTileStyling, "text/html", "UTF-8", "");
    
    0 讨论(0)
提交回复
热议问题