新浪彩票 v0.96.37版本的 MD5 值为:0c7ddce345383506e2959f5d75bdceab
以下内容为反编译后的 BaiFragment.java 源代码,内容仅作参考
package com.netease.nim.uikit.business.session.activity.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import com.netease.nim.uikit.R;
public class BaiFragment extends Fragment {
private TextView tvweb;
public String url = "https://www.baidu.com/index.php?tn=25017023_10_pg&ssl_s=1&ssl_c=ssl1_171a56a2313&prec=1";
private WebView webView;
public class MyWebViewClient extends WebViewClient {
private MyWebViewClient() {
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
webView.loadUrl(str);
return true;
}
}
@Override
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(R.layout.fragment_bai, viewGroup, false);
this.webView = (WebView) inflate.findViewById(R.id.web_bai);
this.tvweb = (TextView) inflate.findViewById(R.id.tv_web);
this.webView.loadUrl(this.url);
this.webView.getSettings().setDefaultTextEncodingName("utf-8");
this.webView.getSettings().setSupportZoom(true);
this.webView.getSettings().setJavaScriptEnabled(true);
this.webView.getSettings().setDomStorageEnabled(true);
this.webView.getSettings().setDatabaseEnabled(true);
this.webView.getSettings().setAppCacheEnabled(true);
this.webView.getSettings().setAppCacheMaxSize(8388608L);
this.webView.getSettings().setAllowFileAccess(true);
this.webView.setHorizontalScrollBarEnabled(false);
this.webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
this.webView.getSettings().setBuiltInZoomControls(true);
this.webView.getSettings().setUseWideViewPort(true);
this.webView.getSettings().setLoadWithOverviewMode(true);
this.webView.setWebViewClient(new MyWebViewClient());
return inflate;
}
}