|
|
@ -1,5 +1,6 @@ |
|
|
|
package xyz.fycz.myreader.ui.activity; |
|
|
|
package xyz.fycz.myreader.ui.activity; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import android.annotation.SuppressLint; |
|
|
|
import android.graphics.Bitmap; |
|
|
|
import android.graphics.Bitmap; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.view.Menu; |
|
|
|
import android.view.Menu; |
|
|
@ -54,12 +55,16 @@ public class SourceLoginActivity extends BaseActivity { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
|
|
|
|
@SuppressLint("SetJavaScriptEnabled") |
|
|
|
protected void initWidget() { |
|
|
|
protected void initWidget() { |
|
|
|
WebSettings settings = binding.webView.getSettings(); |
|
|
|
WebSettings settings = binding.webView.getSettings(); |
|
|
|
settings.setSupportZoom(true); |
|
|
|
settings.setSupportZoom(true); |
|
|
|
settings.setBuiltInZoomControls(true); |
|
|
|
settings.setBuiltInZoomControls(true); |
|
|
|
settings.setDefaultTextEncodingName("UTF-8"); |
|
|
|
settings.setDefaultTextEncodingName("UTF-8"); |
|
|
|
//settings.setUserAgentString(APPCONST.DEFAULT_USER_AGENT);
|
|
|
|
settings.setLoadWithOverviewMode(true); |
|
|
|
|
|
|
|
if (bookSource.getHeaderMap(false).containsKey(APPCONST.UA_NAME)){ |
|
|
|
|
|
|
|
settings.setUserAgentString(bookSource.getHeaderMap(false).get(APPCONST.UA_NAME)); |
|
|
|
|
|
|
|
} |
|
|
|
settings.setJavaScriptEnabled(true); |
|
|
|
settings.setJavaScriptEnabled(true); |
|
|
|
CookieManager cookieManager = CookieManager.getInstance(); |
|
|
|
CookieManager cookieManager = CookieManager.getInstance(); |
|
|
|
binding.webView.setWebViewClient(new WebViewClient() { |
|
|
|
binding.webView.setWebViewClient(new WebViewClient() { |
|
|
|