From b66264b21ef35be73d5c09646389bb1ca7f0fcd5 Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 4 Aug 2021 21:53:29 +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 --- .../ui/association/ImportBookSourceDialog.kt | 2 +- .../ui/association/ImportRssSourceDialog.kt | 2 +- .../legado/app/ui/book/cache/CacheActivity.kt | 4 +-- .../io/legado/app/ui/book/group/GroupEdit.kt | 2 +- .../app/ui/book/group/GroupManageDialog.kt | 2 +- .../app/ui/book/group/GroupSelectDialog.kt | 4 +-- .../app/ui/book/local/ImportBookActivity.kt | 2 +- .../app/ui/book/read/ReadBookBaseActivity.kt | 2 +- .../ui/book/read/config/BgTextConfigDialog.kt | 2 +- .../ui/book/read/config/SpeakEngineDialog.kt | 2 +- .../app/ui/book/read/config/TocRegexDialog.kt | 2 +- .../book/source/manage/BookSourceActivity.kt | 8 +++--- .../book/source/manage/GroupManageDialog.kt | 9 +++--- .../app/ui/config/OtherConfigFragment.kt | 2 +- .../app/ui/config/ThemeConfigFragment.kt | 2 +- .../main/bookshelf/BaseBookshelfFragment.kt | 4 +-- .../app/ui/replace/GroupManageDialog.kt | 4 +-- .../app/ui/replace/ReplaceRuleActivity.kt | 2 +- .../ui/rss/source/manage/GroupManageDialog.kt | 4 +-- .../ui/rss/source/manage/RssSourceActivity.kt | 2 +- app/src/main/res/layout/dialog_edit_text.xml | 28 +++++++++++-------- 21 files changed, 48 insertions(+), 43 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt index cee6ca70f..e3a096677 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt @@ -176,7 +176,7 @@ class ImportBookSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickList appDb.bookSourceDao.allGroup.forEach { group -> groups.addAll(group.splitNotBlank(AppPattern.splitGroupRegex)) } - editView.setHint(R.string.group_name) + textInputLayout.setHint(R.string.group_name) editView.setFilterValues(groups.toList()) editView.dropDownHeight = 180.dp } diff --git a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt index 41d3e9567..f2a8188dd 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt @@ -172,7 +172,7 @@ class ImportRssSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListe appDb.rssSourceDao.allGroup.forEach { group -> groups.addAll(group.splitNotBlank(AppPattern.splitGroupRegex)) } - editView.setHint(R.string.group_name) + textInputLayout.setHint(R.string.group_name) editView.setFilterValues(groups.toList()) editView.dropDownHeight = 180.dp } diff --git a/app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt b/app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt index 9c03a0851..9fed01921 100644 --- a/app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt @@ -298,7 +298,7 @@ class CacheActivity : VMBaseActivity() private fun alertExportFileName() { alert(R.string.export_file_name) { val alertBinding = DialogEditTextBinding.inflate(layoutInflater).apply { - editView.hint = "file name js" + textInputLayout.hint = "file name js" editView.setText(AppConfig.bookExportFileName) } customView { alertBinding.root } @@ -318,7 +318,7 @@ class CacheActivity : VMBaseActivity() private fun showCharsetConfig() { alert(R.string.set_charset) { val alertBinding = DialogEditTextBinding.inflate(layoutInflater).apply { - editView.hint = "charset name" + textInputLayout.hint = "charset name" editView.setFilterValues(charsets) editView.setText(AppConfig.exportCharset) } diff --git a/app/src/main/java/io/legado/app/ui/book/group/GroupEdit.kt b/app/src/main/java/io/legado/app/ui/book/group/GroupEdit.kt index c2a3610cf..79d66bd42 100644 --- a/app/src/main/java/io/legado/app/ui/book/group/GroupEdit.kt +++ b/app/src/main/java/io/legado/app/ui/book/group/GroupEdit.kt @@ -15,7 +15,7 @@ object GroupEdit { fun show(context: Context, layoutInflater: LayoutInflater, bookGroup: BookGroup) = context.run { alert(title = getString(R.string.group_edit)) { val alertBinding = DialogEditTextBinding.inflate(layoutInflater).apply { - editView.setHint(R.string.group_name) + textInputLayout.setHint(R.string.group_name) editView.setText(bookGroup.groupName) } if (bookGroup.groupId >= 0) { diff --git a/app/src/main/java/io/legado/app/ui/book/group/GroupManageDialog.kt b/app/src/main/java/io/legado/app/ui/book/group/GroupManageDialog.kt index ca6271a15..89dfd8495 100644 --- a/app/src/main/java/io/legado/app/ui/book/group/GroupManageDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/group/GroupManageDialog.kt @@ -103,7 +103,7 @@ class GroupManageDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener private fun addGroup() { alert(title = getString(R.string.add_group)) { val alertBinding = DialogEditTextBinding.inflate(layoutInflater).apply { - editView.setHint(R.string.group_name) + textInputLayout.setHint(R.string.group_name) } customView { alertBinding.root } yesButton { diff --git a/app/src/main/java/io/legado/app/ui/book/group/GroupSelectDialog.kt b/app/src/main/java/io/legado/app/ui/book/group/GroupSelectDialog.kt index d202701ab..8a7fff0a5 100644 --- a/app/src/main/java/io/legado/app/ui/book/group/GroupSelectDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/group/GroupSelectDialog.kt @@ -125,7 +125,7 @@ class GroupSelectDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener private fun addGroup() { alert(title = getString(R.string.add_group)) { val alertBinding = DialogEditTextBinding.inflate(layoutInflater).apply { - editView.setHint(R.string.group_name) + textInputLayout.setHint(R.string.group_name) } customView { alertBinding.root } yesButton { @@ -143,7 +143,7 @@ class GroupSelectDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener private fun editGroup(bookGroup: BookGroup) { alert(title = getString(R.string.group_edit)) { val alertBinding = DialogEditTextBinding.inflate(layoutInflater).apply { - editView.setHint(R.string.group_name) + textInputLayout.setHint(R.string.group_name) editView.setText(bookGroup.groupName) } customView { alertBinding.root } diff --git a/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt index 0601cacd0..bea70bba4 100644 --- a/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt @@ -280,7 +280,7 @@ class ImportBookActivity : VMBaseActivity - - + android:layout_height="wrap_content"> - \ No newline at end of file + + + + + \ No newline at end of file