Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在android上绘图时,有什么方法可以找出特定时间戳的坐标?当用户在屏幕上绘制某些东西时,我想知道每 5 毫秒后的 x 和 y 坐标。
覆盖onTouchEvent并保存x,y从 object 获得的坐标,使用and类MotionEvent每 5 毫秒读取一次变量。TimerTaskTimer
onTouchEvent
x,y
MotionEvent
TimerTask
Timer