BasePopup
BasePopup copied to clipboard
setOutSideTouchable(true)后事件并没有穿透
提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都会有这种情况。
有没有可能是contentView也覆盖了“外部”
有没有可能是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是正确的)
现在的实现实际上是点击外部的时候把事件抛给act的rootview https://github.com/razerdp/BasePopup/blob/master/lib/src/main/java/razerdp/basepopup/BasePopupWindow.java#L908
现在的实现实际上是点击外部的时候把事件抛给act的rootview https://github.com/razerdp/BasePopup/blob/master/lib/src/main/java/razerdp/basepopup/BasePopupWindow.java#L908
现在就是想达到版本3.1.8的效果。。