TheDevMan TheDevMan - 3 years ago 97
Android Question

Update URL according to the link clicked in webview in android

When I type the url in the text box and click on the Go button the webview loads the required page but when I click on any link inside the webview the address bar which is the text box is not updated with the exact url? How do I go about doing this?

I am trying all varies ways on google not getting the solution - probably key words are wrong. :( - Help on this would be great.


Answer Source

You need to Override onPageFinished method

public void onPageFinished(WebView view, String url) {

    urlEditText.setText(url, TextView.BufferType.NORMAL);

    super.onPageFinished(view, url);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download