Issue
I have an android application in which upon clicking “netbank icon” I am launching a webview with URL loaded in it, with the help of method webview.loadUrl(). When I press hard key back on the device it goes to the previous screen.
Now I am on the screen which has “netbank icon”. Upon clicking this icon I want to show the previous webview again without loading new url. I just want to bring that webview to front. What is the way out for that?
I have tried webview.bringtofront() but it only show a blank screen.
Solution
if the webview is being loaded in a new activity, then when you press the hard back button basically, onDestroy() of that activity is called, which means activity no more exists and when u again click the icon the activity is created once again....hence you cannot get the same web view state when you once go back and then come again...
you may find something of your interest here: http://developer.android.com/reference/android/webkit/WebView.html
Answered By - Usama Sarwar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.