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

PopupWindow会遮盖虚拟工具栏0.6.0、0.6.1、0.7.0都试过 #41

Open
op123355569 opened this issue Aug 25, 2021 · 8 comments
Open

Comments

@op123355569
Copy link

  1. 集成本库
  2. 使用这个库BasePopup,写弹窗
  3. 只设置状态栏(也试过设置虚拟工具栏)
  4. 弹窗
    结果:弹窗底部被虚拟工具栏遮盖
    PS:如果不执行Step3的话,弹窗是正常的
    未弹窗状态
    用本库设置了状态栏并弹窗状态
    未用本库设置状态栏并弹窗状态
@op123355569
Copy link
Author

我自己Fork 0.6.1 了一下,然后把设置状态栏部分代码里所有相关默认设置虚拟工具栏的代码注释掉的话就正常了

@Zackratos
Copy link
Owner

Activity 的底部会被遮盖吗

@op123355569
Copy link
Author

不会

@Zackratos
Copy link
Owner

可以把你的 demo 放在你 fork 的项目里面吗,我看一下

@op123355569
Copy link
Author

我开了一个Demo UxDemo

@Zackratos
Copy link
Owner

Zackratos commented Aug 26, 2021

找到原因了,因为我给 ActivitycontentView 设置了 bottomPadding,高度为导航栏的高度,然后 BasePopup 在底部弹出 PopupWindow 的时候,就是以 contentView 为基准的,所以就出现了你看到的问题,理论上来说,可以通过把 bottomPadding 改为 bottomMargin 或者把 contentView 改为 decorView 的方法来解决,但是如果为了解决跟其他框架的冲突而修改原来的逻辑不太合适,我再想一下有没有其他的方法解决这个问题吧

@op123355569
Copy link
Author

好的,谢谢大神解答

@Zackratos
Copy link
Owner

Zackratos commented Nov 16, 2021

@op123355569 如果你只需要设置状态栏而不需要设置导航栏的话,更新到 0.8.0 版本,使用 statusBarOnly 方法替换 statusBar 方法可以彻底解决这个问题
出现这个问题的原因可以看 issues44 里面我的解释

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