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

Android15的BottomPopupView会被导航栏遮挡 #1248

Open
LexLEEway opened this issue Dec 27, 2024 · 2 comments
Open

Android15的BottomPopupView会被导航栏遮挡 #1248

LexLEEway opened this issue Dec 27, 2024 · 2 comments

Comments

@LexLEEway
Copy link

XPopup版本
如2.10.0

手机系统和型号
任何安卓手机 Android 15

描述你的问题
bottom弹窗会被导航栏遮挡,100%出现,低版本不会
PixPin_2024-12-27_17-16-01

弹出的代码如下
new XPopup.Builder(getActivity())
.moveUpToKeyboard(false)
.isCenterHorizontal(true)
.asCustom(popupView)
.show();

@zhangzhen1129
Copy link

XPopup版本 如2.10.0

手机系统和型号 任何安卓手机 Android 15

描述你的问题 bottom弹窗会被导航栏遮挡,100%出现,低版本不会 PixPin_2024-12-27_17-16-01

弹出的代码如下 new XPopup.Builder(getActivity()) .moveUpToKeyboard(false) .isCenterHorizontal(true) .asCustom(popupView) .show();

那应该是 Android 15 edge-to-edge 得埚了

@LiuPack
Copy link

LiuPack commented Jan 2, 2025

XPopup版本 如2.10.0
手机系统和型号 任何安卓手机 Android 15
描述你的问题 bottom弹窗会被导航栏遮挡,100%出现,低版本不会 PixPin_2024-12-27_17-16-01
弹出的代码如下 new XPopup.Builder(getActivity()) .moveUpToKeyboard(false) .isCenterHorizontal(true) .asCustom(popupView) .show();

那应该是 Android 15 edge-to-edge 得埚了

这个需要你给底部的布局添加系统navigatorBar的padding来处理

ViewCompat.setOnApplyWindowInsetsListener(view) { v, insets ->
            val systemInsets = insets.getInsets(WindowInsetsCompat.Type.navigationBars())
            v.setPadding(0, 0, 0, systemInsets.bottom)
            insets
        }

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

3 participants