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

setOutSideTouchable(true)后事件并没有穿透 #492

Open
qq908323236 opened this issue May 17, 2023 · 4 comments
Open

setOutSideTouchable(true)后事件并没有穿透 #492

qq908323236 opened this issue May 17, 2023 · 4 comments

Comments

@qq908323236
Copy link

qq908323236 commented May 17, 2023

提issue前请去WIKI#常见问题查询相关问题,避免重复提问

Please go to WIKI#FAQ for relevant questions before commit your issue to avoid repetitive questions.


提issue前请务必参考以下格式填写,否则该问题会被直接关闭。

Please be sure to follow the format below before submitting the issue, otherwise the question will be actively closed!

  • 系统版本(必须)/ System version (required):Android 12
  • 库版本(必须)/ Library version (required):3.2.1

问题描述/重现步骤请写在这里
Please write the description here.

设置setOutSideTouchable(true)后并不能真正穿透,比如外部区域有个Button,点击这个Button后有点击效果,但实际上并没有实际执行,感觉并没有走ACTION_UP,只走了ACTION_DOWN;
3.1.8版本就是正常的,3.2.0、3.2.1都会有这种情况。

@razerdp
Copy link
Owner

razerdp commented May 20, 2023

有没有可能是contentView也覆盖了“外部”

@qq908323236
Copy link
Author

有没有可能是contentView也覆盖了“外部”

应该是没有可能。
coontentView的xml的根布局:
android:layout_width="wrap_content"
android:layout_height="wrap_content"

然后设置了,isOutSideTouchable = true
当只是单纯的点击外部时,比如外部有一个按钮,这个时候,这个按钮有点击效果,但是没有回调它的点击事件。(就感觉是只穿透了的ACTION_DOWN,没有穿透ACTION_UP)
当是滑动外部时,比如外部有个Recyclerview,这个时候,这个列表可以滑动,但是PopupWindow还没有dismiss,但滑动完的时候才dismiss

还有代码不变的情况下,只修改引用的sdk版本号, 3.2.0/3.2.1 的点击外部按钮的效果与3.1.8的确实不一样。(3.1.8是正确的)

@razerdp
Copy link
Owner

razerdp commented May 24, 2023

现在的实现实际上是点击外部的时候把事件抛给act的rootview
https://github.com/razerdp/BasePopup/blob/master/lib/src/main/java/razerdp/basepopup/BasePopupWindow.java#L908

@qq908323236
Copy link
Author

现在的实现实际上是点击外部的时候把事件抛给act的rootview https://github.com/razerdp/BasePopup/blob/master/lib/src/main/java/razerdp/basepopup/BasePopupWindow.java#L908

现在就是想达到版本3.1.8的效果。。

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