Can't handle both click and touch events simultaneously

后端 未结 12 2058
时光说笑
时光说笑 2020-12-01 03:45

I am trying to handle touch events and click events on a button. I do the following:

button.setOnClickListener(clickListener);
button.setOnTouchListener(touc         


        
12条回答
  •  日久生厌
    2020-12-01 04:01

    I suppose you're returning true in your OnTouchListener? That will consume the event so it won't be sent down for any further processing.

    On a side note - what's the point of having both a click and touch listener?

提交回复
热议问题