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 9baf473a9..17fd056ee 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 @@ -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 ) } 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 217d1521b..d3aab6465 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 @@ -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 ) }