content: package com.lhc.ocat.android_demo;
  
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.v7.app.AppCompatActivity;
  import android.util.Log;
  import android.webkit.WebResourceError;
  import android.webkit.WebResourceRequest;
  import android.webkit.WebSettings;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  
  public class WebActivity extends AppCompatActivity {
  
      private static final String TAG = "WebActivity";
      private WebView mWebView;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_web);
  
          Intent intent = getIntent();
          String url = intent.getStringExtra(MainActivity.ACTIVITY_INTENT_URL_KEY);
          Log.i(TAG, "将要访问的 URL:" + url);
  
          mWebView = findViewById(R.id.webView);
          WebSettings webSettings = mWebView.getSettings();
          webSettings.setJavaScriptEnabled(true);
          mWebView.setWebViewClient(new WebViewClient() {
              @Override
              public void onPageFinished(WebView view, String url) {
                  super.onPageFinished(view, url);
              }
  
              @Override
              public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
                  super.onReceivedError(view, request, error);
              }
          });
          webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
          mWebView.loadUrl(url);
      }
  }
  