号簿助手 v4.6.31版本的 MD5 值为:9d7ff98a6bb5cc178eac2df4d1b2f0e0
以下内容为反编译后的 AboveQRCodeAdapter.java 源代码,内容仅作参考
package com.chinatelecom.pim.ui;
import android.app.Activity;
import android.webkit.WebSettings;
import android.webkit.WebView;
import com.chinatelecom.pim.R;
import com.chinatelecom.pim.foundation.common.view.ViewAdapter;
import com.chinatelecom.pim.foundation.common.view.ViewModel;
import com.chinatelecom.pim.foundation.lang.model.Theme;
import com.chinatelecom.pim.ui.view.HeaderView;
public class AboveQRCodeAdapter extends ViewAdapter<AboveQRCodeModel> {
public AboveQRCodeAdapter(Activity activity, Theme theme) {
super(activity, theme);
}
@Override
public AboveQRCodeModel doSetup() {
this.activity.setContentView(R.layout.above_qr_code_activity);
AboveQRCodeModel model = new AboveQRCodeModel();
model.setHeaderView((HeaderView) this.activity.findViewById(R.id.header_view));
model.setWebView((WebView) this.activity.findViewById(R.id.qrcode_webview));
return model;
}
public void initWebView() {
getModel().getHeaderView().setMiddleView("关于二维码");
getActivity().getIntent();
WebSettings wv_setting = getModel().getWebView().getSettings();
wv_setting.setJavaScriptEnabled(true);
wv_setting.setUseWideViewPort(true);
wv_setting.setDefaultTextEncodingName("UTF-8");
wv_setting.setUseWideViewPort(true);
wv_setting.setLoadWithOverviewMode(true);
wv_setting.setSavePassword(true);
wv_setting.setSaveFormData(true);
wv_setting.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
wv_setting.setLoadsImagesAutomatically(true);
wv_setting.setAllowFileAccess(true);
wv_setting.setDomStorageEnabled(true);
wv_setting.setGeolocationEnabled(true);
wv_setting.setGeolocationDatabasePath("/data/data/org.itri.html5webview/databases/");
wv_setting.setAppCacheMaxSize(31457280L);
String appCachePath = getActivity().getApplicationContext().getCacheDir().getAbsolutePath();
wv_setting.setAppCachePath(appCachePath);
wv_setting.setAllowFileAccess(true);
wv_setting.setAppCacheEnabled(true);
wv_setting.setJavaScriptCanOpenWindowsAutomatically(true);
getModel().getWebView().setSaveEnabled(false);
getModel().getWebView().requestFocus();
getModel().getWebView().loadUrl("https://www.baidu.com");
getModel().getHeaderView().getRightView().setVisibility(8);
getModel().getHeaderView().getRightNextView().setVisibility(8);
getModel().getHeaderView().getRightThreeView().setVisibility(8);
}
public class AboveQRCodeModel extends ViewModel {
private HeaderView headerView;
private WebView webView;
public AboveQRCodeModel() {
}
public void setHeaderView(HeaderView headerView) {
this.headerView = headerView;
}
public HeaderView getHeaderView() {
return this.headerView;
}
public void setWebView(WebView webView) {
this.webView = webView;
}
public WebView getWebView() {
return this.webView;
}
}
}