From 215e49cdbc6258d1e437d4fe3222dd767c8c771c Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 13 Oct 2020 22:13:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/replacerule/ReplaceRuleActivity.kt | 6 ++++-- .../io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt | 6 ++++-- app/src/main/res/layout/activity_replace_rule.xml | 1 - app/src/main/res/layout/dialog_replace_edit.xml | 2 +- app/src/main/res/values/styles.xml | 7 +++---- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt b/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt index f41cba885..6e0ae230d 100644 --- a/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt +++ b/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt @@ -42,9 +42,11 @@ import org.jetbrains.anko.startActivity import org.jetbrains.anko.toast import java.io.File - +/** + * 替换规则管理 + */ class ReplaceRuleActivity : - VMBaseActivity(R.layout.activity_replace_rule, false), + VMBaseActivity(R.layout.activity_replace_rule), SearchView.OnQueryTextListener, PopupMenu.OnMenuItemClickListener, FileChooserDialog.CallBack, diff --git a/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt b/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt index 4bbfb44be..fd922296b 100644 --- a/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt +++ b/app/src/main/java/io/legado/app/ui/replacerule/edit/ReplaceEditDialog.kt @@ -23,6 +23,9 @@ import io.legado.app.utils.toast import kotlinx.android.synthetic.main.dialog_replace_edit.* import org.jetbrains.anko.sdk27.listeners.onFocusChange +/** + * 编辑替换规则 + */ class ReplaceEditDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener, KeyboardToolPop.CallBack { @@ -92,8 +95,7 @@ class ReplaceEditDialog : BaseDialogFragment(), val rule = getReplaceRule() if (!rule.isValid()){ toast(R.string.replace_rule_invalid) - } - else{ + } else{ viewModel.save(rule) { callBack?.onReplaceRuleSave() dismiss() diff --git a/app/src/main/res/layout/activity_replace_rule.xml b/app/src/main/res/layout/activity_replace_rule.xml index 9dec7eab0..926273704 100644 --- a/app/src/main/res/layout/activity_replace_rule.xml +++ b/app/src/main/res/layout/activity_replace_rule.xml @@ -12,7 +12,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" app:contentLayout="@layout/view_search" - app:fitStatusBar="false" app:title="@string/replace_purify" /> + android:layout_height="wrap_content"> - //**************************************************************System - Style******************************************************************************// + //**********System Style******************// - //**************************************************************Widget - Style******************************************************************************// + //*******************Widget Style**********************************// +