Without any doubts, the Android SDK has a poor documentations. There is pitfalls and traps about the APIs without any mentions in SDK documentations.
1. Webview.clearhistory ()
When there was only one item in WebView ' s internal back/forward list, clearhistory () won ' t clear anything. When there is more than one items in Back/forward list, clearhistory () would clear all the items except the top one, or th e current one.
The next question you might ask was when WebView adds an item to its Back/forward list when loading a URL. By listening webchromeclient.onprogresschanged (), we can know this if new progress is bigger than, the loading URL w Ill is added to its Back/forward list. So when new progress are bigger than, loading URL becomes current item and thus you can clear previous loaded URLs by CA Lling clearhistory ().
Android WebView Untold Stories