Difference between OnTouch and OnClick Android

后端 未结 6 1161
南旧
南旧 2020-11-27 13:33

Is there any difference between OnTouchListener and OnClickListener? I am not asking from programming point of view, but from User Experience point

6条回答
  •  猫巷女王i
    2020-11-27 14:33

    A "Touch" event is when someone puts their finger on the screen. It gets called throughout the movement of the finger, down, drag, and up. A "Click" need not even come from the screen. It could be someone pressing the enter key.

    Use OnTouchListener when you want to receive events from someone's finger on the screen.

    Use OnClickListener when you want to detect clicks.

提交回复
热议问题