feat: 优化

pull/277/head
kunfei 5 years ago
parent d72b63b99a
commit 204ebe072f
  1. 10
      app/src/main/java/io/legado/app/ui/book/read/config/TipConfigDialog.kt

@ -25,12 +25,10 @@ class TipConfigDialog : BaseDialogFragment() {
Help.upSystemUiVisibility(it) Help.upSystemUiVisibility(it)
it.windowManager?.defaultDisplay?.getMetrics(dm) it.windowManager?.defaultDisplay?.getMetrics(dm)
} }
dialog?.window?.let { dialog?.window?.setLayout(
val attr = it.attributes ViewGroup.LayoutParams.MATCH_PARENT,
attr.dimAmount = 0.0f ViewGroup.LayoutParams.WRAP_CONTENT
it.attributes = attr )
it.setLayout((dm.widthPixels * 0.9).toInt(), ViewGroup.LayoutParams.WRAP_CONTENT)
}
} }
override fun onCreateView( override fun onCreateView(

Loading…
Cancel
Save