Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CenterPopupView弹窗宽度无法占满屏幕 #1226

Open
fumayer opened this issue Aug 6, 2024 · 1 comment
Open

CenterPopupView弹窗宽度无法占满屏幕 #1226

fumayer opened this issue Aug 6, 2024 · 1 comment

Comments

@fumayer
Copy link

fumayer commented Aug 6, 2024

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

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

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

@liuya891012
Copy link

liuya891012 commented Sep 10, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants