use of android.webkit.WebHistoryItem in project newsrob by marianokamp.
the class ShowArticleActivity method dumpHistory.
private void dumpHistory() {
if (false) {
WebBackForwardList history = webView.copyBackForwardList();
for (int i = 0, lim = history.getSize(); i < lim; i++) {
WebHistoryItem hi = history.getItemAtIndex(i);
System.out.println("XXX" + i + " url = " + hi.getUrl() + " originalUrl=" + hi.getOriginalUrl());
}
System.out.println("XXX current url=" + selectedEntry.getAlternateHRef());
}
}
use of android.webkit.WebHistoryItem in project phonegap-facebook-plugin by Wizcorp.
the class CordovaWebView method printBackForwardList.
public void printBackForwardList() {
WebBackForwardList currentList = this.copyBackForwardList();
int currentSize = currentList.getSize();
for (int i = 0; i < currentSize; ++i) {
WebHistoryItem item = currentList.getItemAtIndex(i);
String url = item.getUrl();
LOG.d(TAG, "The URL at index: " + Integer.toString(i) + " is " + url);
}
}
use of android.webkit.WebHistoryItem in project Rocket by mozilla-tw.
the class BrowserFragment method goBack.
public void goBack() {
final TabView current = tabsSession.getFocusTab().getTabView();
if (current != null) {
WebBackForwardList webBackForwardList = ((WebView) current).copyBackForwardList();
WebHistoryItem item = webBackForwardList.getItemAtIndex(webBackForwardList.getCurrentIndex() - 1);
updateURL(item.getUrl());
current.goBack();
}
}
use of android.webkit.WebHistoryItem in project Rocket by mozilla-tw.
the class BrowserFragment method goForward.
public void goForward() {
final TabView current = tabsSession.getFocusTab().getTabView();
if (current != null) {
WebBackForwardList webBackForwardList = ((WebView) current).copyBackForwardList();
WebHistoryItem item = webBackForwardList.getItemAtIndex(webBackForwardList.getCurrentIndex() + 1);
updateURL(item.getUrl());
current.goForward();
}
}
use of android.webkit.WebHistoryItem in project phonegap-facebook-plugin by Wizcorp.
the class CordovaWebView method startOfHistory.
// Can Go Back is BROKEN!
public boolean startOfHistory() {
WebBackForwardList currentList = this.copyBackForwardList();
WebHistoryItem item = currentList.getItemAtIndex(0);
if (item != null) {
// Null-fence in case they haven't called loadUrl yet (CB-2458)
String url = item.getUrl();
String currentUrl = this.getUrl();
LOG.d(TAG, "The current URL is: " + currentUrl);
LOG.d(TAG, "The URL at item 0 is: " + url);
return currentUrl.equals(url);
}
return false;
}
Aggregations