@@ -0,0 +1,2091 @@
+package com.wx.android.common.web;%0A%0Aimport android.app.Activity;%0Aimport android.content.Context;%0Aimport android.content.Intent;%0Aimport android.os.Bundle;%0Aimport android.view.View;%0Aimport android.webkit.WebView;%0Aimport android.webkit.WebViewClient;%0Aimport android.widget.LinearLayout;%0A%0Aimport com.wx.android.common.util.StringUtils;%0A%0A/**%0A * Web Page%0A *%0A * @author fengwx%0A */%0Apublic class WebActivity extends Activity %7B%0A%0A    private static final String URL = %22URL%22;%0A%0A    private WebView mWebView;%0A%0A    private String mUrl;%0A%0A    /**%0A     * Start web activity%0A     *%0A     * @param context%0A     * @param url%0A     */%0A    public static void start(Context context, String url) %7B%0A        Intent intent = new Intent(context, WebActivity.class);%0A        intent.putExtra(URL, url);%0A        context.startActivity(intent);%0A    %7D%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(createContentView());%0A        getIntentData();%0A        initWebViewConfigs();%0A        loadUrl();%0A    %7D%0A%0A    /**%0A     * Create content view%0A     *%0A     * @return%0A     */%0A    private View createContentView() %7B%0A        // root layout%0A        LinearLayout layout = new LinearLayout(this);%0A        layout.setOrientation(LinearLayout.VERTICAL);%0A%0A        // webview%0A        mWebView = new WebView(this);%0A        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout%0A                .LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT);%0A        layout.addView(mWebView, params);%0A%0A        return layout;%0A    %7D%0A%0A    /**%0A     * Get intent data%0A     */%0A    private void getIntentData() %7B%0A        mUrl = getIntent().getStringExtra(URL);%0A    %7D%0A%0A    /**%0A     * Init WebView configs%0A     */%0A    private void initWebViewConfigs() %7B%0A        mWebView.getSettings().setJavaScriptEnabled(true);%0A        mWebView.setWebViewClient(new WebViewClient());%0A    %7D%0A%0A    /**%0A     * Load url%0A     */%0A    private void loadUrl() %7B%0A        if (!StringUtils.equalsNull(mUrl)) %7B%0A            mWebView.loadUrl(mUrl);%0A        %7D%0A    %7D%0A%0A%0A%7D%0A

add webactivity