create WebView and config it - Android User Interface

Android examples for User Interface:WebView

Description

create WebView and config it

Demo Code


//package com.java2s;
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   w  w w .  jav a 2s  .co  m
}

Related Tutorials