junixapp / XPopup

🔥XPopup2.0版本重磅来袭,2倍以上性能提升,带来可观的动画性能优化和交互细节的提升!!!功能强大,交互优雅,动画丝滑的通用弹窗!可以替代Dialog,PopupWindow,PopupMenu,BottomSheet,DrawerLayout,Spinner等组件,自带十几种效果良好的动画, 支持完全的UI和动画自定义!(Powerful and Beautiful Popup for Android,can absolutely replace Dialog,PopupWindow,PopupMenu,BottomSheet,DrawerLayout,Spinner. With built-in animators , very easy to custom popup view.)
Apache License 2.0
7.76k stars 1.17k forks source link

dismiss方法会走多次 #1210

Open fuchengxin opened 7 months ago

fuchengxin commented 7 months ago

XPopup版本 2.10.0

手机系统和型号 荣耀X40 GT

描述你的问题

在dialog点击外围消失的时候,会多次执行dismiss方法,如图所示,在点击非dialog区域,在onTouchEvet方法中会执行MotionEvent.ACTION_MOVE与MotionEvent.ACTION_UP两个动作中的checkDismissArea(event); 其中每次调用checkDismissArea(event)就调用了dismiss,所以dismiss会执行多次,demo也能复现此问题 image

fuchengxin commented 7 months ago

image image 补充图片,点击一次外围调用了4次dismiss