Is there any difference between OnTouchListener and OnClickListener? I am not asking from programming point of view, but from User Experience point of view.
Which one is better to use?
Do we need to implement both?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It really depends on your requirement.
onTouchgives you Motion Event. Thus, you can do a lot of fancy things as it help you separate state of movement. Just to name a few:Those are common actions we usually implement to get desire result such as dragging view on screen.
On the other hand,
onClickdoesn’t give you much except which view user interacts.onClickis a complete event comprising of focusing,pressing and releasing. So, you have little control over it. One side up is it is very simple to implement.It is not necessary unless you want to mess up with your user. If you just want simple click event, go for
onClick. If you want more than click, go foronTouch. Doing both will complicate the process.From User point of view, it is unnoticeable if you implement
onTouchcarefully to look likeonClick.