Webview's loadData() is not working in android 10.0 (Q)

前端 未结 6 1388
暖寄归人
暖寄归人 2021-01-19 06:16

Here i am trying to load Html code as string in webview\'s loadData() .Nothing is happen over this mehtod but same method is working like charm in below sdk 29.

6条回答
  •  無奈伤痛
    2021-01-19 07:10

    I came up with another solution by using loadDataWithBaseURL

    e.g.

    webView.loadDataWithBaseURL(null, html, "text/html", null, null)
    

    It should use less CPU and memory resource as no need Base64 calculation and storing.

提交回复
热议问题