From 78ba6a7069bac55c85d9918e420fbeec20521baa Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 6 Oct 2021 22:26:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EditText.kt => lib/theme/view/ThemeEditText.kt} | 4 ++-- .../java/io/legado/app/ui/browser/WebViewActivity.kt | 2 ++ .../java/io/legado/app/ui/login/RuleUiLoginDialog.kt | 2 +- app/src/main/res/layout/activity_book_info_edit.xml | 8 ++++---- app/src/main/res/layout/activity_replace_edit.xml | 10 +++++----- app/src/main/res/layout/dialog_book_group_edit.xml | 2 +- app/src/main/res/layout/dialog_bookmark.xml | 4 ++-- .../res/layout/dialog_direct_link_upload_config.xml | 6 +++--- app/src/main/res/layout/dialog_http_tts_edit.xml | 2 +- app/src/main/res/layout/dialog_page_key.xml | 4 ++-- app/src/main/res/layout/dialog_rule_sub_edit.xml | 4 ++-- app/src/main/res/layout/dialog_toc_regex_edit.xml | 4 ++-- 12 files changed, 27 insertions(+), 25 deletions(-) rename app/src/main/java/io/legado/app/{ui/widget/text/EditText.kt => lib/theme/view/ThemeEditText.kt} (72%) diff --git a/app/src/main/java/io/legado/app/ui/widget/text/EditText.kt b/app/src/main/java/io/legado/app/lib/theme/view/ThemeEditText.kt similarity index 72% rename from app/src/main/java/io/legado/app/ui/widget/text/EditText.kt rename to app/src/main/java/io/legado/app/lib/theme/view/ThemeEditText.kt index c1d0676bb..997ddb871 100644 --- a/app/src/main/java/io/legado/app/ui/widget/text/EditText.kt +++ b/app/src/main/java/io/legado/app/lib/theme/view/ThemeEditText.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget.text +package io.legado.app.lib.theme.view import android.content.Context import android.util.AttributeSet @@ -9,7 +9,7 @@ import io.legado.app.utils.applyTint /** * @author Aidan Follestad (afollestad) */ -class EditText(context: Context, attrs: AttributeSet) : AppCompatEditText(context, attrs) { +class ThemeEditText(context: Context, attrs: AttributeSet) : AppCompatEditText(context, attrs) { init { if (!isInEditMode) { diff --git a/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt b/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt index 415e8cefa..e77a34e1d 100644 --- a/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt +++ b/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt @@ -73,6 +73,8 @@ class WebViewActivity : VMBaseActivity() { mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW domStorageEnabled = true allowContentAccess = true + useWideViewPort = true + loadWithOverviewMode = true } binding.webView.addJavascriptInterface(this, "app") upWebViewTheme() diff --git a/app/src/main/java/io/legado/app/ui/login/RuleUiLoginDialog.kt b/app/src/main/java/io/legado/app/ui/login/RuleUiLoginDialog.kt index 3e5ccf948..c3cf79da9 100644 --- a/app/src/main/java/io/legado/app/ui/login/RuleUiLoginDialog.kt +++ b/app/src/main/java/io/legado/app/ui/login/RuleUiLoginDialog.kt @@ -5,6 +5,7 @@ import android.os.Bundle import android.text.InputType import android.view.View import android.view.ViewGroup +import android.widget.EditText import android.widget.TextView import androidx.core.view.setPadding import androidx.fragment.app.activityViewModels @@ -14,7 +15,6 @@ import io.legado.app.constant.AppLog import io.legado.app.data.entities.BaseSource import io.legado.app.databinding.DialogLoginBinding import io.legado.app.lib.theme.primaryColor -import io.legado.app.ui.widget.text.EditText import io.legado.app.ui.widget.text.TextInputLayout import io.legado.app.utils.* import io.legado.app.utils.viewbindingdelegate.viewBinding diff --git a/app/src/main/res/layout/activity_book_info_edit.xml b/app/src/main/res/layout/activity_book_info_edit.xml index 0301bcfb6..8b685b653 100644 --- a/app/src/main/res/layout/activity_book_info_edit.xml +++ b/app/src/main/res/layout/activity_book_info_edit.xml @@ -48,7 +48,7 @@ android:layout_height="wrap_content" android:hint="@string/book_name"> - - - @@ -125,7 +125,7 @@ android:layout_marginTop="10dp" android:hint="@string/book_intro"> - diff --git a/app/src/main/res/layout/activity_replace_edit.xml b/app/src/main/res/layout/activity_replace_edit.xml index 348c6eb2e..2a4370beb 100644 --- a/app/src/main/res/layout/activity_replace_edit.xml +++ b/app/src/main/res/layout/activity_replace_edit.xml @@ -33,7 +33,7 @@ android:layout_height="wrap_content" android:hint="@string/replace_rule_summary"> - - - - - - - - - - - - - - - @@ -47,7 +47,7 @@ android:hint="Url" tools:ignore="HardcodedText"> - diff --git a/app/src/main/res/layout/dialog_toc_regex_edit.xml b/app/src/main/res/layout/dialog_toc_regex_edit.xml index 71ea57fb7..52f152187 100644 --- a/app/src/main/res/layout/dialog_toc_regex_edit.xml +++ b/app/src/main/res/layout/dialog_toc_regex_edit.xml @@ -13,7 +13,7 @@ android:layout_height="wrap_content" android:hint="@string/name"> - -