Android : Navigation Back in WebView

Use Following Code to Implement Navigation Back Feature:

 @Override

public boolean onKeyDown(int keyCode, KeyEvent event) {

if ((keyCode == KeyEvent.KEYCODE_BACK) && myWebView.canGoBack()) {

myWebView.goBack(); // Go to previous page

return true;

}

// Use this as else part

return super.onKeyDown(keyCode, event);

}

You may also like...

6 Responses

  1. Myrl says:

    At this time it seems like WordPress is the preferred blogging platform available right now. (from what I’ve read) Is that what you’re using on your blog?

  2. Hi there, i read your blog occasionally and i own a similar one and i was just curious if you get a lot of spam comments? If so how do you stop it, any plugin or anything you can suggest? I get so much lately it’s driving me crazy so any support is very much appreciated.

  3. I always read your content closely. I’m likewise looking into free car games, perhaps you could write about this occasionally. Bye!

  4. I’m extremely impressed along with your writing skills and also with the format on your weblog. Is this a paid theme or did you modify it your self? Either way stay up the nice quality writing, it’s rare to see a great weblog like this one today..

  5. Valuable info. Lucky me I found your web site by accident, and I am shocked why this accident didn’t happened earlier! I bookmarked it.

  6. There are actually great improvements on the structure of the blog, I definitely love it. My website is dealing with how to attract a faithful woman and generally there are quite a lot of stuff to be done, I’m currently a novice in website development. Thanks!

Leave a Reply

Your email address will not be published.