Can't handle both click and touch events simultaneously

后端 未结 12 2064
时光说笑
时光说笑 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:06

    You should return false in your OnTouchListener then your OnClickListener will be also handled.

提交回复
热议问题