leotyndale / enfloatingview Goto Github PK
View Code? Open in Web Editor NEW🔥应用内悬浮窗,无需一切权限,适配所有ROM和厂商,no permission floating view.
Home Page: https://imuxuan.com
🔥应用内悬浮窗,无需一切权限,适配所有ROM和厂商,no permission floating view.
Home Page: https://imuxuan.com
原生页面正常,进入flutter页面就不显示了
悬浮窗导致 ToastUtils 显示的Toast 显示在addFloatingView的页面
是真的难用,我都不知道怎么加自定义视图,算了还是换其他的吧
在customView 设置一个view而不是layout, 没有马上添加到界面上
调用了
FloatingView.get().remove();
没有消失
再调用
FloatingView.get().add();
屏幕上就是两个悬浮窗了。
多循环几次,就是好多悬浮窗。
EnFloatingView中的onTouchEvent事件
@Override
public boolean onTouchEvent(MotionEvent event) {
super.onTouchEvent(event);
if (event != null) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
mLastTouchDownTime = System.currentTimeMillis();
break;
case MotionEvent.ACTION_UP:
if (isOnClickEvent()) {
dealClickEvent();
}
break;
}
}
return true;
}
super.onTouchEvent(event);和下面的case MotionEvent.ACTION_UP会导致触发两次dealClickEvent
如题
请问怎么设置自己的布局文件layout 进去 我要设置自己样式?
updateViewPosition函数我看可以控制移动范围
ANR Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length: 32. Wait queue head age: 5595.0ms.)
android.os.MessageQueue.nativePollOnce(Native Method)
1.在进入新页面后返回原页面,悬浮窗点击闪退了。
2.能不能增加一个让悬浮窗隐藏和显示的功能,remove方法好像把悬浮窗都删掉了,add也是弄了个新的出来,想要旧的悬浮窗只需要初始化一次,后面仅仅显示和隐藏而已。
3.能否设置让悬浮窗贴边,因为里面离边边好像还有13px的距离。
When i try to build this project. The error show below:
Caused by: java.nio.file.NoSuchFileException: /Users/brianhsux/AndroidStudioProjects/EnFloatingView/floatingview/build/intermediates/res/symbol-table-with-package/debug/package-aware-r.txt
Could u help to check this?
thanks.
可以在相应activity内重写onStart和onStop覆盖掉悬浮窗的方法,或者在baseActivity加标记位,子类重写等都可以,有很多种方法。。。。大佬说一种吧,都试了不行呢。。。
点开一个activity且快速退出该activity,悬浮窗会消失。bug级别1级
您好,我引入您的项目,用 Glide 加载网络图片无法拖拽,请问这个是什么原因呢?谢谢!
1、A页面显示了一张大图
2、跳转到B页面,图片会闪烁
悬浮窗横竖屏切换会出现超出屏幕外的问题。
操作复现:刚开始竖屏 -> 切至横屏 -> 把悬浮窗调至右边 -> 切至竖屏。
用拿到控件设置点击的方法会导致不能移动,事件被拦截了
val iv = ImageView(this)
iv.setImageResource(R.mipmap.net_status1)
val fmv = FloatingMagnetView(this)
fmv.addView(iv)
//这样会崩溃
FloatingView.get().add()
FloatingView.get().view.removeAllViews()
FloatingView.get().view.addView(iv)
//这样会添加一屏幕的悬浮窗
FloatingView.get().add()
FloatingView.get().customView(fmv)
//这样会没有任何效果
FloatingView.get().customView(fmv).add()
//研究半天,要放自己图片,要这样。
FloatingView.get().icon(R.mipmap.net_status1).add()
//切换还得先remove
FloatingView.get().listener//点击事件也没有成功回调
startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(this).toBundle())
返回的时候生命周期跟普通转场不同,导致按钮消失
点击事件怎么实现呢?
可以添加多个全局悬浮按钮吗
请用最新的折叠屏模拟器测试,如果在展开时把悬浮窗贴到屏幕右侧,然后把屏幕折上,悬浮窗就不会同步显示到小屏幕的右侧,会在屏幕外侧。根本看不见,是个严重的问题啊
小米,oppo,vivo之类的手机,如果用户没有打开后台启动界面,悬浮窗可以唤起Activity吗?或者是否能检测权限没开启,然后提醒用户?
FloatingView 被remove, listener的onRemove没有被调用
我又两个图片如何获取布局imageview的id ,做显示隐藏对应的图片
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
at android.view.ViewGroup.addViewInner(ViewGroup.java:5138)
at android.view.ViewGroup.addView(ViewGroup.java:4967)
at android.view.ViewGroup.addView(ViewGroup.java:4904)
at android.view.ViewGroup.addView(ViewGroup.java:4877)
at com.imuxuan.floatingview.FloatingView.attach(FloatingView.java:98)
at com.imuxuan.floatingview.FloatingView.attach(FloatingView.java:81)
at net.ifengniao.task.frame.base.BaseActivity.onStart(BaseActivity.java:104)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1433)
at android.app.Activity.performStart(Activity.java:7923)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3337)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2049)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:228)
at android.app.ActivityThread.main(ActivityThread.java:7589)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:953)
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.