Issue
I am trying to learn and implement android Webview for my own understanding.
As a part of it I want my Webview to behave like android browser. So that every url can be launched in new screen.
e.g. if some url on page A is clicked then it should be opened in new screen and click on any url on this screen will launch the new screen and so on.
I want to navigate back to prev page on back key just like the default browser does.
I need suggestions about my approach if anybody has done this before.
Solution
back button to prev page is .goback() and
@Override
public void onBackPressed(){
if(history is not null)
webview.goBack();
else
finish();
}
Answered By - sique
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.