How can I detect time press duration of button in android?

Keywords´╝Ü android button onpress

Question: 

I want to detect time press duration of button by using setOnTouchListener with onTouch method

How I can do this ? Thanks you so much

Answers: