Giter Club home page Giter Club logo

enfloatingview's Introduction

Anurag's GitHub stats

《移动开发架构设计实战》

enfloatingview's People

Contributors

leotyndale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enfloatingview's Issues

你好,我在使用过程中遇到如下问题,第一点的bug比较致命,希望可以有好的解决方法,感谢

1.在进入新页面后返回原页面,悬浮窗点击闪退了。
2.能不能增加一个让悬浮窗隐藏和显示的功能,remove方法好像把悬浮窗都删掉了,add也是弄了个新的出来,想要旧的悬浮窗只需要初始化一次,后面仅仅显示和隐藏而已。
3.能否设置让悬浮窗贴边,因为里面离边边好像还有13px的距离。

点击有时候会触发 ANR

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)

有异常java.lang.IllegalStateException: The specified child already has a parent. You must call removeView()

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)

一会儿就是满屏的悬浮窗

调用了
FloatingView.get().remove();
没有消失
再调用
FloatingView.get().add();
屏幕上就是两个悬浮窗了。
多循环几次,就是好多悬浮窗。

如何在某个activity隐藏

可以在相应activity内重写onStart和onStop覆盖掉悬浮窗的方法,或者在baseActivity加标记位,子类重写等都可以,有很多种方法。。。。大佬说一种吧,都试了不行呢。。。

小米,oppo后台启动权限

小米,oppo,vivo之类的手机,如果用户没有打开后台启动界面,悬浮窗可以唤起Activity吗?或者是否能检测权限没开启,然后提醒用户?

折叠屏,悬浮窗位置不能自动变换

请用最新的折叠屏模拟器测试,如果在展开时把悬浮窗贴到屏幕右侧,然后把屏幕折上,悬浮窗就不会同步显示到小屏幕的右侧,会在屏幕外侧。根本看不见,是个严重的问题啊

这样会崩溃

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//点击事件也没有成功回调

悬浮窗横竖屏问题

悬浮窗横竖屏切换会出现超出屏幕外的问题。
操作复现:刚开始竖屏 -> 切至横屏 -> 把悬浮窗调至右边 -> 切至竖屏。

Why package-aware-r.txt not found?

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.

使用转场动画bug

    startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(this).toBundle())

返回的时候生命周期跟普通转场不同,导致按钮消失

dealClickEvent会触发两次

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.