????Android?????????????У??????????????????????????????????UC??????У?????????????е???????????????????????????????????????????????????????λ?????robotium???и?drag(float fromX?? float toX?? float fromY?? float toY??int stepCount)????????????drag??г?????????裬????????????????????????????????????????????????????

????drag?????????????£?

 public void drag(float fromX?? float toX?? float fromY?? float toY??
   int stepCount) {
  long downTime = SystemClock.uptimeMillis();
  long eventTime = SystemClock.uptimeMillis();
  float y = fromY;
  float x = fromX;
  float yStep = (toY - fromY) / stepCount;
  float xStep = (toX - fromX) / stepCount;
  MotionEvent event = MotionEvent.obtain(downTime?? eventTime??MotionEvent.ACTION_DOWN?? fromX?? fromY?? 0);
  try {
   inst.sendPointerSync(event);
  } catch (SecurityException ignored) {}
  for (int i = 0; i < stepCount; ++i) {
   y += yStep;
   x += xStep;
   eventTime = SystemClock.uptimeMillis();
   event = MotionEvent.obtain(downTime?? eventTime??MotionEvent.ACTION_MOVE?? x?? y?? 0);
   try {
    inst.sendPointerSync(event);
   } catch (SecurityException ignored) {}
  }
  eventTime = SystemClock.uptimeMillis();
  event = MotionEvent.obtain(downTime?? eventTime?? MotionEvent.ACTION_UP??toX?? toY?? 0);
  try {
   inst.sendPointerSync(event);
  } catch (SecurityException ignored) {}
 }

???????????????????MotionEvent??ACTION_DOWN?????????2?????ACTION_MOVE???????????????????ACTION_UP???????????????????????????????????????robotium?е?????????????????????????????????