如何获取 RecyclerView当前是否处于已经滑动状态
发布网友
发布时间:2022-05-11 20:43
我来回答
共1个回答
热心网友
时间:2023-07-29 01:36
switch (action) {
case MotionEvent.ACTION_DOWN:
DownX = event.getX();//float DownX
DownY = event.getY();//float DownY
currentMS = System.currentTimeMillis();//long currentMS 获取系统时间
break;
case MotionEvent.ACTION_MOVE:
float moveX = event.getX() - DownX;//X轴距离
float moveY = event.getY() - DownY;//y轴距离
long moveTime = System.currentTimeMillis() - currentMS搜索;//移动时间
break;
case MotionEvent.ACTION_UP:
break;
}