4

Issue is goback() not showing my html data back. Steps to produce this issue is like

  1. Loaded html data using method loadDataWithBaseURL. It renders html data fine.
  2. Then click on one link inside html data then webview moves to next page showing that link which is also fine.
  3. When I call method goback() from this page it should show my html data but it is showing me blank screen. Inside onPageFinished() I am getting url as about:blank.

Thanks in advance!

peak
  • 105,803
  • 17
  • 152
  • 177
Vivek Gabadiya
  • 234
  • 2
  • 8

1 Answers1

1

If you use loadDataWithBaseURL you will need to send in the url parameter something different from null, if you send null the url will always be "about:blank"

Example:

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

Notice im using C# but it should be the same with java, except for the CapitalizedWords

DnTo ArAn
  • 31
  • 4