Click Listeners on Views Not Working

已完成

评论

5 条评论

  • DJI Developer Support
    I think the likelihood of MSDK V5 affecting the view layer is quite low. If MSDK V5 were to cause interference, the sample code should have special handling for the view, but it appears that it does not. Does your application run normally after removing MSDK V5? Which version?
    0
    评论操作 固定链接
  • Peacemaker Otoo

    When removing the SDK (the tried versions 5.8.0 and 5.10.0), my application works fine. However, when using 5.10.0, button clicks require additional logic, such as adding an `OnTouchListener` to handle touch events before the `OnClickListener` works properly:

    ```kotlin
    binding.btnOpen.setOnTouchListener { ... }
    ```

    This issue affects all child views as well. It seems like the MSDK or the UXSDK might be interfering with event propagation.

    0
    评论操作 固定链接
  • DJI Developer Support
    Is your project using the uxsdk library? If so, you can consider removing the UXSDK library first. The UXSDK library uses kotlin-android-extensions, not ViewBinding.
    0
    评论操作 固定链接
  • Peacemaker Otoo

    Yes I am using the uxsdk library and I have corrected the kotlin-android-extensions errors to use viewbinding but can these changes cause the above mentioned problem, causing my view not to respond to clicklistener?

    0
    评论操作 固定链接
  • DJI Developer Support
    The UXSDK library does not use view binding, so we are unsure if your changes are the cause of the listener failure. However, confirming this is easy; you just remove the UXSDK library, keep the Mobile SDK, and then run your application again. Currently, we have not received feedback from others regarding the same issue.
    0
    评论操作 固定链接

请先登录再写评论。