pull/1298/head
gedoor 3 years ago
parent 02ed26f6d1
commit f9e5a05fbe
  1. 6
      app/src/main/java/io/legado/app/ui/login/RuleUiLoginDialog.kt
  2. 13
      app/src/main/res/layout/dialog_login.xml

@ -50,7 +50,7 @@ class RuleUiLoginDialog : BaseDialogFragment() {
when (rowUi.type) { when (rowUi.type) {
"text" -> layoutInflater.inflate(R.layout.item_source_edit, binding.root, false) "text" -> layoutInflater.inflate(R.layout.item_source_edit, binding.root, false)
.let { .let {
binding.listView.addView(it) binding.flexbox.addView(it)
it.id = index it.id = index
(it as TextInputLayout).hint = rowUi.name (it as TextInputLayout).hint = rowUi.name
it.findViewById<EditText>(R.id.editText).apply { it.findViewById<EditText>(R.id.editText).apply {
@ -59,7 +59,7 @@ class RuleUiLoginDialog : BaseDialogFragment() {
} }
"password" -> layoutInflater.inflate(R.layout.item_source_edit, binding.root, false) "password" -> layoutInflater.inflate(R.layout.item_source_edit, binding.root, false)
.let { .let {
binding.listView.addView(it) binding.flexbox.addView(it)
it.id = index it.id = index
(it as TextInputLayout).hint = rowUi.name (it as TextInputLayout).hint = rowUi.name
it.findViewById<EditText>(R.id.editText).apply { it.findViewById<EditText>(R.id.editText).apply {
@ -70,7 +70,7 @@ class RuleUiLoginDialog : BaseDialogFragment() {
} }
"button" -> layoutInflater.inflate(R.layout.item_fillet_text, binding.root, false) "button" -> layoutInflater.inflate(R.layout.item_fillet_text, binding.root, false)
.let { .let {
binding.listView.addView(it) binding.flexbox.addView(it)
it.id = index it.id = index
(it as TextView).let { textView -> (it as TextView).let { textView ->
textView.text = rowUi.name textView.text = rowUi.name

@ -19,10 +19,17 @@
app:popupTheme="@style/AppTheme.PopupOverlay" app:popupTheme="@style/AppTheme.PopupOverlay"
app:titleTextAppearance="@style/ToolbarTitle" /> app:titleTextAppearance="@style/ToolbarTitle" />
<LinearLayout <com.google.android.flexbox.FlexboxLayout
android:id="@+id/list_view" android:id="@+id/flexbox"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" /> 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" />
</LinearLayout> </LinearLayout>
Loading…
Cancel
Save