/**
* 初始化
*/
public void init() {
returnBnt = findViewById(R.id.returnBnt);
mainWeb = findViewById(R.id.mainWeb);
// 开启Cookie
if (android.os.Build.VERSION.SDK_INT >= 21) {
CookieManager.getInstance().setAcceptThirdPartyCookies(mainWeb, true);
}else {
CookieManager.getInstance().setAcceptCookie(true);
}
initWebView();
mainWeb.loadUrl(URL);
}
网友评论