Android Webview goback () problem with loadDataWithBaseURL method

The problem is goback () not displaying my html data. The steps to create this problem are similar to

  • Loaded html data using the loadDataWithBaseURL method. It displays html data in order.
  • Then click on one link inside the html data, then the webview will move to the next page showing this link, which is also great.
  • When I call the goback () method from this page, it should show my html data, but it shows me a blank screen. Inside onPageFinished () I get a url of roughly: blank.

Thanks in advance!

+4
source share
1 answer

loadDataWithBaseURL, url - , null, url " about: blank"

:

var page = new RazorView().GenerateString();
webView.LoadDataWithBaseURL("file:///android_asset/", page, "text/html", "UTF-8", "");
var url = webView.CopyBackForwardList().GetItemAtIndex(1).Url; 
//url  will get the Html From Previous Page

im, #, java, CapitalizedWords

0

Source: https://habr.com/ru/post/1627732/


All Articles