Giter VIP home page Giter VIP logo

Comments (12)

Petterpx avatar Petterpx commented on May 24, 2024 2

@Petterpx 大佬,你用我的布局试试。一定复现。

事件拦截这边的逻辑有问题,晚点会进行调整。感谢反馈

from floatingx.

Petterpx avatar Petterpx commented on May 24, 2024 1

@Petterpx 大佬,你用我的布局试试。一定复现。

尝试下1.1.0或者最新main分支,已修复。

from floatingx.

Petterpx avatar Petterpx commented on May 24, 2024

我用1.0.7测试的,设置点击事件确实没有回调!我用源码依赖也是一样的问题。不知道哪里出了问题。 image 我这里打了断点确实没有走。

我这边没有发现这个问题,测试点击是没有问题的。你看看还有其他地方操作浮窗吗?

from floatingx.

lexluthors avatar lexluthors commented on May 24, 2024

你的代码确实有问题的,你可以检查一下。 按照你的demo是没有问题。因为你的demo是new的textview添加进去的。我测试的是用layout添加进去的。
image
如果只使用setLayout是一定有问题的。你可以测试一下。这一定是一个bug。

from floatingx.

Petterpx avatar Petterpx commented on May 24, 2024

你的代码确实有问题的,你可以检查一下。 按照你的demo是没有问题。因为你的demo是new的textview添加进去的。我测试的是用layout添加进去的。 image 如果只使用setLayout是一定有问题的。你可以测试一下。这一定是一个bug。

本地测试过了,通过setLayout(layoutId) 这种方式没问题。你可以试试 test_click_listener 分支,已经将测试代码加入

from floatingx.

lexluthors avatar lexluthors commented on May 24, 2024

你的代码确实有问题的,你可以检查一下。 按照你的demo是没有问题。因为你的demo是new的textview添加进去的。我测试的是用layout添加进去的。 image 如果只使用setLayout是一定有问题的。你可以测试一下。这一定是一个bug。

本地测试过了,通过setLayout(layoutId) 这种方式没问题。你可以试试 test_click_listener 分支,已经将测试代码加入

这太邪乎了。我用你demo的setLayoutView的方式,new了一个textview加进去就可以点击。只要使用setLayout传入布局id就一定不能点击。不知道咋回事。你本地测试竟然没有问题? 这个不太科学啊。你不会两个都set了吧,后面一个就覆盖了前面一个了。

from floatingx.

Petterpx avatar Petterpx commented on May 24, 2024

你的代码确实有问题的,你可以检查一下。 按照你的demo是没有问题。因为你的demo是new的textview添加进去的。我测试的是用layout添加进去的。 image 如果只使用setLayout是一定有问题的。你可以测试一下。这一定是一个bug。

本地测试过了,通过setLayout(layoutId) 这种方式没问题。你可以试试 test_click_listener 分支,已经将测试代码加入

这太邪乎了。我用你demo的setLayoutView的方式,new了一个textview加进去就可以点击。只要使用setLayout传入布局id就一定不能点击。不知道咋回事。你本地测试竟然没有问题? 这个不太科学啊。你不会两个都set了吧,后面一个就覆盖了前面一个了。

你可以本地试试我的分支,结果就会得知

from floatingx.

lexluthors avatar lexluthors commented on May 24, 2024

大佬,我找到问题了, 用我的布局试试!



你把item_floating.xml换成这个布局。试试。换成你的布局就可以。我用自己的布局就不可以。你这个是有指定布局控件一定是cardview才有点击事件吗? 我把你的布局放到我的代码里面完全没有问题。 换成自己的点击事件无效。 你可以自己测试一下。

from floatingx.

lexluthors avatar lexluthors commented on May 24, 2024

大佬,我找到问题了, 用我的布局试试!



你把item_floating.xml换成这个布局。试试。换成你的布局就可以。我用自己的布局就不可以。你这个是有指定布局控件一定是cardview才有点击事件吗? 我把你的布局放到我的代码里面完全没有问题。 换成自己的点击事件无效。 你可以自己测试一下。

from floatingx.

lexluthors avatar lexluthors commented on May 24, 2024

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@android:color/transparent" android:gravity="center" android:orientation="vertical" > <Button android:text="收起" android:textStyle="bold" android:textColor="@color/white" android:id="@+id/floatBall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#ff0000" android:textSize="14sp" /> </LinearLayout>

这是我的布局, button是无法点击的是吧?

from floatingx.

lexluthors avatar lexluthors commented on May 24, 2024

@Petterpx 大佬,你用我的布局试试。一定复现。

from floatingx.

Petterpx avatar Petterpx commented on May 24, 2024

@Petterpx 大佬,你用我的布局试试。一定复现。

复现了,正在排查

from floatingx.

Related Issues (20)

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.