Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.webkit.WebView;

public class Main {
    public static void execIsEnabledCallbackCommand(final WebView webView, final String commandName,
            final String isEnabled) {
        if (webView == null) {
            return;
        }

        webView.post(new Runnable() {
            @Override
            public void run() {
                String command = "javascript:" + commandName + "(" + isEnabled + ");";
                webView.loadUrl(command);
            }
        });
    }
}