create WebView - Android android.webkit

Android examples for android.webkit:WebView

Description

create WebView

Demo Code

import android.content.Context;
import android.graphics.Color;
import android.webkit.WebSettings;
import android.webkit.WebView;

public class Main{

    public static WebView createWebView(Context context) {
        final WebView web_V = new WebView(context);
        web_V.setBackgroundColor(Color.TRANSPARENT);
        WebSettings webSettings = web_V.getSettings();
        webSettings.setJavaScriptEnabled(true);
        return web_V;
    }/*from www .  j a  v a  2 s.  com*/

}

Related Tutorials