pull/21/head
fengyuecanzhu 3 years ago
parent da5c5ecd30
commit a774c7056b
  1. 2
      app/build.gradle
  2. 2
      app/src/main/java/xyz/fycz/myreader/entity/sourceedit/EditEntityUtil.kt
  3. 7
      app/src/main/java/xyz/fycz/myreader/ui/activity/SourceLoginActivity.java

@ -44,7 +44,7 @@ def getVersionName(){
def hun = (version / 100).toInteger() def hun = (version / 100).toInteger()
def ten = (version / 10).toInteger() % 10 def ten = (version / 10).toInteger() % 10
def one = version % 10 def one = version % 10
return hun + "." + ten + "." + one + "-debug" return hun + "." + ten + "." + one
} }
def versionN = getVersionName() def versionN = getVersionName()

@ -33,7 +33,7 @@ object EditEntityUtil {
) )
add(EditEntity("loginUrl", source?.loginUrl, R.string.login_url, "")) add(EditEntity("loginUrl", source?.loginUrl, R.string.login_url, ""))
add(EditEntity("sourceComment", source?.sourceComment, R.string.comment, "这是您留给使用者的说明")) add(EditEntity("sourceComment", source?.sourceComment, R.string.comment, "这是您留给使用者的说明"))
add(EditEntity("concurrentRate", source?.concurrentRate, R.string.comment, "")) add(EditEntity("concurrentRate", source?.concurrentRate, R.string.source_concurrent_rate, ""))
} }
return sourceEntities return sourceEntities
} }

@ -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() {

Loading…
Cancel
Save