Comments (5)
在设计之处,IFxScrollListener 只是用于在浮窗拖动时的回调,当用户禁用了浮窗移动后,这个接口自然不会收到回调,您要做的应该是监听浮窗内的手势,而浮窗本身是不需要移动的。
为了做到浮窗移动,事件是完全被浮窗拿走了,所以在设计时没有考虑浮窗禁用时内部触摸事件的反馈。
这的确是设计上缺陷,本应该提供一个出口,可以自行处理事件,周末我会出一个api解决这个问题。
from floatingx.
目前我的方式是,禁用 setEnableTouch(false)
,然后重写布局的根 ViewGroup 的 onTouchEvent()
事件,自行处理用户的手势了。
from floatingx.
当然如果您有更好的方式也可以fork进行更改,非常欢迎一起维护这个库。
PS:最近因为拔牙缝线的身体原因,一直没能及时看到issues,回复略迟,不好意思
from floatingx.
试试rc14,IFxScrollListener新增了eventIng(MotionEvent)用于接收当前浮窗所有事件,修改dragIng()方法,增加了MotionEvent参数。appcompat降级到了1.2,无需手动引入kt和appcompat,修改了依赖方式。
from floatingx.
from floatingx.
Related Issues (20)
- 多进程页面失效 HOT 3
- 悬浮窗布局中如果设置了布局中View的点击事件,当点击某个View后拖动悬浮窗会出现跳动 HOT 4
- 希望能开放查询所有显示的浮窗的接口 HOT 7
- 可以局部在ConstraintLayout 展示吗? HOT 3
- FxLocationHelper 中有个错误 HOT 1
- 全局浮窗内用recyclerView无法滑动 HOT 1
- 全局浮窗内用recyclerView无法滑动 HOT 1
- 应用内浮窗会有内存泄漏 HOT 4
- 如何处理长按事件 HOT 2
- 通过 MediaProject 录制屏幕的时候不展示悬浮球应该怎么处理?或者说不把悬浮球录制进去 HOT 1
- 悬浮窗能做到初始状态传递一个自定义View和整个屏幕一样大吗?然后在自定义View中去点击变成小窗模式,再点击还原到全屏悬浮窗 HOT 2
- 两个Activity如果使用了共享元素动画就会出问题 HOT 1
- setOffsetXY参数不支持构造者模式 HOT 1
- IFxViewLifecycle InitView 方法内设置View的子view点击事件无效 HOT 3
- 应用进程杀死问题 HOT 7
- 拖动松开以后,悬浮窗会自动贴边,如何判断悬浮窗是贴的左边还是右边? HOT 4
- 系统悬浮窗一闪而过 HOT 2
- App级别浮窗在多个Activity之间显示和隐藏会有问题 HOT 9
- 有没有点击悬浮窗外部消失的方法 HOT 1
- show()方法没调用的时候,updateViewContent没有效果 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from floatingx.