掘金 | 公众号 | 邮箱 |
---|---|---|
点我 | 程序员江同学 | [email protected] |
ricardojiang / easyfloat Goto Github PK
View Code? Open in Web Editor NEW不需要权限的悬浮窗方案~
不需要权限的悬浮窗方案~
掘金 | 公众号 | 邮箱 |
---|---|---|
点我 | 程序员江同学 | [email protected] |
如题
大佬请问
如果一个悬浮窗上有多个按钮,不同按钮对应不同事件怎么处理更合适啊,对Kotlin部分源码看起来有些费劲
listener不会了
github 的库我要下载都会在码云先同步一份,在下载。否则一上午都下载不下来。
可以暴露出来一些api支持不随手势滑动,禁止自动贴边等。
你好,请问一下要想切换界面悬浮框重置回初始位置怎么实现
在设置的View中,有多个控件需要设置点击、或者控件中的ImageView需要展示网络图片的方法。
作者你好,我是一个Android开发者,首先感谢你的开源项目。
这里描述一个非常令人费解的问题。
页面上悬浮窗的实例显示了两个。
需求:
首页MainActivity 5个tab栏,viewpager2 + fragment实现,需要在跳转到第三个tab时显示悬浮窗,跳转到其他tab页或进入到其它页面关闭即可。
逻辑:
在MainActivity 中的 onResume() 中 判断是第三个tab 显示悬浮窗。在 onPause() 中关闭悬浮窗。
在viewpager切换到第三个 tab显示悬浮窗,切换到其它的关闭悬浮窗。
现象:
目前可知项目使用了大于几千次,出现了两次实例出现了两次的异常情况,亲眼所见,且后台无异常信息。异常时,一个实例一直存在,切换页面,拖动,点击事件等此实例都是没问题的,且 切换页面后可以记录位置,可证明是同一个实例,另一个跟随正常逻辑显示和关闭。即当切换到第三个tab栏时,会显示两个(应该只有一个)两个都拥有正常功能,其它页面一直存在一个(不应该有)。
操作:
随意点击页面切换,跳转,发现 不应该显示的页面显示了一个,切换到应该显示的第三个页面,看到了两个。
通过代码可知悬浮窗是单例的,我通过代码不断执行show()方法打开 实例也只会存在一个,所以出现了这种情况令我很头疼。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.