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