Code example for WebView

Methods: canGoForwardgoForward

0
 
    /** 
     * Checks to see if it is possible to go forward one page in history, then does so. 
     */ 
    private void goForward() { 
        if (this.inAppWebView.canGoForward()) {
            this.inAppWebView.goForward();
        } 
    } 
 
    /** 
     * Navigate to the new page 
     * 
     * @param url to load 
     */ 
    private void navigate(String url) {
        InputMethodManager imm = (InputMethodManager)this.cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(edittext.getWindowToken(), 0);
 
        if (!url.startsWith("http") && !url.startsWith("file:")) {
            this.inAppWebView.loadUrl("http://" + url);