Click here to Skip to main content
15,888,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to go back to previous page and reload that page in Android Webview but I am not able to achive this , I apply the method as follow.

@Override
public void onBackPressed() {
    if (browser.canGoBack()) {
        browser.reload();
        browser.goBack();
        return;
    }

    // Otherwise defer to system default behavior.
    super.onBackPressed();
}


It's only going to previous page but the page is not getting reloaded or refreshed please let me know if i was wrong in something.
Posted
Comments
Richard MacCutchan 5-Sep-15 4:28am    
You are calling the reload method before the goBack. Should it not be the other way round? Go back to the previous page (in the history), and then reload it.
Sandeep Londhe 5-Sep-15 11:50am    
how to achieve this , could you please tell me, how to go to history and then reload the page. Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900