From f9e5a05fbedbbc5909141c87db8aabbe19d640d7 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 7 Sep 2021 08:28:37 +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/login/RuleUiLoginDialog.kt | 6 +++--- app/src/main/res/layout/dialog_login.xml | 13 ++++++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) 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 469bde7af..e84fa6c96 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 @@ -50,7 +50,7 @@ class RuleUiLoginDialog : BaseDialogFragment() { when (rowUi.type) { "text" -> layoutInflater.inflate(R.layout.item_source_edit, binding.root, false) .let { - binding.listView.addView(it) + binding.flexbox.addView(it) it.id = index (it as TextInputLayout).hint = rowUi.name it.findViewById(R.id.editText).apply { @@ -59,7 +59,7 @@ class RuleUiLoginDialog : BaseDialogFragment() { } "password" -> layoutInflater.inflate(R.layout.item_source_edit, binding.root, false) .let { - binding.listView.addView(it) + binding.flexbox.addView(it) it.id = index (it as TextInputLayout).hint = rowUi.name it.findViewById(R.id.editText).apply { @@ -70,7 +70,7 @@ class RuleUiLoginDialog : BaseDialogFragment() { } "button" -> layoutInflater.inflate(R.layout.item_fillet_text, binding.root, false) .let { - binding.listView.addView(it) + binding.flexbox.addView(it) it.id = index (it as TextView).let { textView -> textView.text = rowUi.name diff --git a/app/src/main/res/layout/dialog_login.xml b/app/src/main/res/layout/dialog_login.xml index 98088eda3..8a1e3b13e 100644 --- a/app/src/main/res/layout/dialog_login.xml +++ b/app/src/main/res/layout/dialog_login.xml @@ -19,10 +19,17 @@ app:popupTheme="@style/AppTheme.PopupOverlay" app:titleTextAppearance="@style/ToolbarTitle" /> - + android:clipToPadding="false" + android:overScrollMode="never" + android:padding="3dp" + android:layout_marginTop="8dp" + app:dividerDrawable="@drawable/shape_space_divider" + app:flexDirection="row" + app:flexWrap="wrap" + app:showDivider="middle" /> \ No newline at end of file