Hello folks,
I'm using Webview to display some HTML formatted content.  Actually
the program has several WebViews each on it's own tab.  Some are
loaded with loadURL and others with loadData.     Using Menu
selections I can load several files into each tab.  I don't want to
have the standard "web browser" function of the back button but rather
have back function as a normal non-WebView application. I use
the .clearHistory() method on each webview after loading it.  It seems
that all but the first tab do clear history but the first one (in my
case  webview) always has the 2 most recent pages so 2 presses of the
back button are required to get out of the app.

webview_tables.loadData(Chart_HTML,"text/html", "utf-8");
webview.loadUrl("file:///android_asset/html/"+intSubjectcategory+"-
text.html");
webview_hasty.loadUrl("file:///android_asset/html/"+intSubjectcategory
+"-hasty.html");
webview_invques.loadUrl("file:///android_asset/
html/"+intSubjectcategory+"-questions.html");

webview.clearHistory();
webview_invques.clearHistory();
webview_tables.clearHistory();
webview_hasty.clearHistory();

All the webviews are setup as below (obviously changing the name):

            webview = (WebView) findViewById(R.id.webview);
            webview.setWebViewClient(new HelloWebViewClient());
            webview.getSettings().setJavaScriptEnabled(true);
            webview.getSettings().setBuiltInZoomControls(true);

>From searching it seems that this is not an unusual problem but didn't
find a solution that works.   What I would really like to do is to set
the webviews to not save history at all since I don't need it .   I
really like the ease of using Webview to

Any pointers to info pages or suggestions about possible solutions
would be appreciated.

Robert

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to