Skip to content

Commit

Permalink
yoyiyi
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyiyi committed Aug 1, 2017
1 parent 647153d commit 983a901
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.yoyiyi.soleil.module.app;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
Expand Down Expand Up @@ -44,8 +45,6 @@ public class BrowerActivity extends AppCompatActivity {
Toolbar mToolbar;
private String mTitle;
private String mUrl;
private WebClient mWebChromeClient;
private WebClientBase mWebViewClient;
private String mImg;

@Override
Expand Down Expand Up @@ -146,9 +145,10 @@ public void onReceivedError(WebView webView, int i, String s, String s1) {

}

@SuppressLint("SetJavaScriptEnabled")
protected void initWebView() {
mWebChromeClient = new WebClient();
mWebViewClient = new WebClientBase();
WebClient webChromeClient = new WebClient();
WebClientBase webViewClient = new WebClientBase();
WebSettings webSettings = mWebView.getSettings();
//设置js支持
webSettings.setJavaScriptEnabled(true);
Expand All @@ -167,10 +167,10 @@ protected void initWebView() {
webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
mWebView.setDrawingCacheEnabled(true);
mWebView.getSettings().setBlockNetworkImage(true);
mWebView.setWebViewClient(mWebViewClient);
mWebView.setWebViewClient(webViewClient);
mWebView.requestFocus(View.FOCUS_DOWN);
mWebView.getSettings().setDefaultTextEncodingName("UTF-8");
mWebView.setWebChromeClient(mWebChromeClient);
mWebView.setWebChromeClient(webChromeClient);
mWebView.loadUrl(mUrl);
}

Expand Down

0 comments on commit 983a901

Please sign in to comment.