diff --git a/app/src/main/java/io/legado/app/ui/widget/dialog/CodeDialog.kt b/app/src/main/java/io/legado/app/ui/widget/dialog/CodeDialog.kt index 8be9c4bcf..3010e422b 100644 --- a/app/src/main/java/io/legado/app/ui/widget/dialog/CodeDialog.kt +++ b/app/src/main/java/io/legado/app/ui/widget/dialog/CodeDialog.kt @@ -2,6 +2,7 @@ package io.legado.app.ui.widget.dialog import android.os.Bundle import android.view.View +import android.view.ViewGroup import io.legado.app.R import io.legado.app.base.BaseDialogFragment import io.legado.app.databinding.DialogCodeViewBinding @@ -28,7 +29,7 @@ class CodeDialog() : BaseDialogFragment(R.layout.dialog_code_view) { override fun onStart() { super.onStart() - setLayout(0.9f, 0.9f) + setLayout(ViewGroup.LayoutParams.MATCH_PARENT, 0.9f) } override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) { diff --git a/app/src/main/java/io/legado/app/ui/widget/dialog/TextDialog.kt b/app/src/main/java/io/legado/app/ui/widget/dialog/TextDialog.kt index 5cd23167d..3bc4f79c4 100644 --- a/app/src/main/java/io/legado/app/ui/widget/dialog/TextDialog.kt +++ b/app/src/main/java/io/legado/app/ui/widget/dialog/TextDialog.kt @@ -2,6 +2,7 @@ package io.legado.app.ui.widget.dialog import android.os.Bundle import android.view.View +import android.view.ViewGroup import io.legado.app.R import io.legado.app.base.BaseDialogFragment import io.legado.app.databinding.DialogTextViewBinding @@ -43,7 +44,7 @@ class TextDialog() : BaseDialogFragment(R.layout.dialog_text_view) { override fun onStart() { super.onStart() - setLayout(0.9f, 0.9f) + setLayout(ViewGroup.LayoutParams.MATCH_PARENT, 0.9f) } override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {