0

I have a string that I am fetching from a JSON response, the string is as follows:

\u003cp\u003e\u003c/p\u003e\u003cdiv style=\"text-align: center;\"\u003e\r\n\u003cdiv\u003e\u003cimg src=\"http://8wayrun.com/rectangle.png\" alt=\"\" style=\"cursor: default;\"\u003e\u003c/div\u003e\r\n\u003cbr\u003e\r\n\u003cdiv\u003eThis is the central hub for many of the tournaments run on the 8WAYRUN.TV live stream.\u003c/div\u003e\r\n\u003cdiv\u003eYou can find our live stream at: \u003ca href=\"http://8wayrun.tv/\" rel=\"nofollow\"\u003ehttp://8wayrun.tv\u003c/a\u003e\n\u003c/div\u003e\n\u003c/div\u003e\u003cdiv style=\"text-align: center;\"\u003e\r\n\u003c/div\u003e\r\n

This text is put in the string description.

I am then adding this text to a webview as follows:

    WebView desc = (WebView) view.findViewById(R.id.desc);
    desc.loadData(desciption, "text/html", "UTF-8");
    desc.setBackgroundColor(Color.TRANSPARENT);

However, running this code produces a bizarre error: it doens't crash the program or anything, but I would like to know why its happening, and possibly fix it:

E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)

W/cr_BindingManager: Cannot call determinedVisibility()
     - never saw a connection for the pid: 17634
Jason Axelrod
  • 7,155
  • 10
  • 50
  • 78

1 Answers1

0

WebView doesn't support transparent background with hardware acceleration, you need to turn it off. See:

How to get transparent background of webView for 4.0 version

How to make Android Webview Background Transparent at KITKAT(4.4)

But note that non-accelerated WebView will render and scroll slower. You might consider not using a transparent WebView.

Community
  • 1
  • 1
Mikhail Naganov
  • 6,643
  • 1
  • 26
  • 26