优化导入功能

pull/473/head
gedoor 4 years ago
parent 53099f7251
commit 71420e723e
  1. 4
      app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt
  2. 4
      app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt

@ -21,7 +21,6 @@ import io.legado.app.lib.dialogs.noButton
import io.legado.app.lib.dialogs.okButton
import io.legado.app.ui.widget.text.AutoCompleteTextView
import io.legado.app.utils.applyTint
import io.legado.app.utils.getSize
import io.legado.app.utils.getViewModelOfActivity
import io.legado.app.utils.visible
import kotlinx.android.synthetic.main.dialog_edit_text.view.*
@ -40,9 +39,8 @@ class ImportBookSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickList
override fun onStart() {
super.onStart()
val dm = requireActivity().getSize()
dialog?.window?.setLayout(
(dm.widthPixels * 0.9).toInt(),
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
)
}

@ -14,7 +14,6 @@ import io.legado.app.base.BaseDialogFragment
import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.SimpleRecyclerAdapter
import io.legado.app.data.entities.RssSource
import io.legado.app.utils.getSize
import io.legado.app.utils.getViewModelOfActivity
import io.legado.app.utils.visible
import kotlinx.android.synthetic.main.dialog_recycler_view.*
@ -33,9 +32,8 @@ class ImportRssSourcesDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickList
override fun onStart() {
super.onStart()
val dm = requireActivity().getSize()
dialog?.window?.setLayout(
(dm.widthPixels * 0.9).toInt(),
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT
)
}

Loading…
Cancel
Save