Fast taps (clicks) on RecyclerView opens multiple Fragments

前端 未结 10 906
渐次进展
渐次进展 2021-02-02 13:37

I have implemented onClick listener to my ViewHolder for my RecyclerView

But when I perform very fast double taps or mouse clicks, it performs the task (opens a seperate

10条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-02 13:49

    I know this is late and the answer has already been given, but I found that this similar issue for my case was due to a third party library Material Ripple Layout. By default it enables a delay call to onClick and allows for multiple request to be made to onClick so when the animation finishes all those clicks get registered at once and opens multiple dialogs.

    this setting cancels the delay and fixed the problem for me in my case.

    app:mrl_rippleDelayClick="false"
    

提交回复
热议问题