// Path: app/src/main/java/pro/kisscat/www/bookmarkhelper/common/shared/MetaData.java
// public final class MetaData {
//     public static final String LOG_V_DEFAULT = "MONITOR";
//     public static final String LOG_W_DEFAULT = "WARN";
//     public static final String LOG_E_DEFAULT = "EXCEPTION";
//     public static final String LOG_E_FATAL = "FATAL";
//     public static final String BOOKMARK_TITLE_DEFAULT = "UnNamed";
//     public static final String NETWORKERRORURL = "file:///android_asset/errorPage/error.html";
//     public static final String folderTypeDefaultName = "folder";
// }


import android.content.Context;
import android.graphics.Bitmap;
import android.view.View;
import android.view.View.OnLongClickListener;
import android.webkit.WebSettings;
import android.webkit.WebSettings.RenderPriority;
import android.webkit.WebSettings.ZoomDensity;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import pro.kisscat.www.bookmarkhelper.common.shared.MetaData;
package pro.kisscat.www.bookmarkhelper.activity.QRCode.widget;



/**
 * 自定义WebView，长按图片获取图片url
 *
 * @author LinZhang
 */
public class CustomWebView extends WebView implements OnLongClickListener {
    private Context context;
    private LongClickCallBack mCallBack;

    public CustomWebView(Context context, LongClickCallBack mCallBack) {
        super(context);
        this.context = context;
        this.mCallBack = mCallBack;
        initSettings();
    }

    private void initSettings() {
        // 初始化设置
        WebSettings mSettings = this.getSettings();
        mSettings.setJavaScriptEnabled(true);//开启javascript
        mSettings.setDomStorageEnabled(true);//开启DOM
        mSettings.setDisplayZoomControls(false);//关闭页面的放大缩小按钮
        mSettings.setDefaultTextEncodingName("utf-8");//设置字符编码
        //设置web页面
        mSettings.setAllowFileAccess(true);//设置支持文件流
        mSettings.setSupportZoom(true);// 支持缩放
        mSettings.setBuiltInZoomControls(true);// 支持缩放
        mSettings.setUseWideViewPort(true);// 调整到适合webview大小
        mSettings.setLoadWithOverviewMode(true);// 调整到适合webview大小
// Path: app/src/main/java/pro/kisscat/www/bookmarkhelper/common/shared/MetaData.java
// public final class MetaData {
//     public static final String LOG_V_DEFAULT = "MONITOR";
//     public static final String LOG_W_DEFAULT = "WARN";
//     public static final String LOG_E_DEFAULT = "EXCEPTION";
//     public static final String LOG_E_FATAL = "FATAL";
//     public static final String BOOKMARK_TITLE_DEFAULT = "UnNamed";
//     public static final String NETWORKERRORURL = "file:///android_asset/errorPage/error.html";
//     public static final String folderTypeDefaultName = "folder";
// }


// Path: app/src/main/java/pro/kisscat/www/bookmarkhelper/activity/QRCode/widget/CustomWebView.java
import android.content.Context;
import android.graphics.Bitmap;
import android.view.View;
import android.view.View.OnLongClickListener;
import android.webkit.WebSettings;
import android.webkit.WebSettings.RenderPriority;
import android.webkit.WebSettings.ZoomDensity;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import pro.kisscat.www.bookmarkhelper.common.shared.MetaData;

package pro.kisscat.www.bookmarkhelper.activity.QRCode.widget;



/**
 * 自定义WebView，长按图片获取图片url
 *
 * @author LinZhang
 */
public class CustomWebView extends WebView implements OnLongClickListener {
    private Context context;
    private LongClickCallBack mCallBack;

    public CustomWebView(Context context, LongClickCallBack mCallBack) {
        super(context);
        this.context = context;
        this.mCallBack = mCallBack;
        initSettings();
    }

    private void initSettings() {
        // 初始化设置
        WebSettings mSettings = this.getSettings();
        mSettings.setJavaScriptEnabled(true);//开启javascript
        mSettings.setDomStorageEnabled(true);//开启DOM
        mSettings.setDisplayZoomControls(false);//关闭页面的放大缩小按钮
        mSettings.setDefaultTextEncodingName("utf-8");//设置字符编码
        //设置web页面
        mSettings.setAllowFileAccess(true);//设置支持文件流
        mSettings.setSupportZoom(true);// 支持缩放
        mSettings.setBuiltInZoomControls(true);// 支持缩放
        mSettings.setUseWideViewPort(true);// 调整到适合webview大小
        mSettings.setLoadWithOverviewMode(true);// 调整到适合webview大小
        mSettings.setDefaultZoom(ZoomDensity.FAR);// 屏幕自适应网页,如果没有这个，在低分辨率的手机上显示可能会异常