Simulate Long press by Touch events

前端 未结 4 1540
执念已碎
执念已碎 2021-02-06 18:08

How can we simulate long press by touch event? or how can we calculate the time that screen is touched, all in ACTION_DOWN state?

4条回答
  •  遥遥无期
    2021-02-06 19:07

    For calculating touch count you can get getPointerCount() of your event like here

    and for Long click maybe this helps

    Edit: and hope this link help you determining getting touch duration

提交回复
热议问题