junixapp/XPopup

CenterPopupView弹窗宽度无法占满屏幕

Closed this issue · 1 comments

XPopup.Builder(requireContext())
.isDestroyOnDismiss(true)
.popupWidth(ScreenUtils.getScreenWidth())
.asCustom(
SignInCenterDialog(requireContext())
).show()

override fun getPopupWidth(): Int {
    return ScreenUtils.getScreenWidth()+1000
}

两种方法都试了,还是无法占满屏幕宽度

我也发现这个问题,不过文档写了,可以重写getMaxWidth为屏幕宽度resources.displayMetrics.widthPixels
image