getDownTime()和getEventTime() [英] getDownTime() and getEventTime()

查看:619
本文介绍了getDownTime()和getEventTime()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

:getEventTime()和getDownTime()有什么区别?在文档 http://developer.android.com/reference/android/view/MotionEvent中.html
两者似乎都做相同的事情,但是它们输出不同的值。

What is difference between:getEventTime() and getDownTime()? In documentation http://developer.android.com/reference/android/view/MotionEvent.html Both seems to do the same thing but they output different values.

推荐答案

getDownTime 返回此系列事件的开始时间。例如,如果您得到:

getDownTime returns the time this series of events started. For example, if you got:

ACTION_DOWN ACTION_MOVE ,然后 ACTION_MOVE

如果您在此最新事件中致电 getDownTime ,您将获得的时间ACTION_DOWN ,这是开始该系列的事件。

If you call getDownTime on this latest event, you will get the time of the ACTION_DOWN, which is the event that started the series.

如果您调用 getEventTime 您将获得最新的 ACTION_MOVE 发生的时间。

If you call getEventTimeyou will get when the latest ACTION_MOVE happened.

这篇关于getDownTime()和getEventTime()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆