Package com.android.chimpchat.adb.LinearInterpolator

Examples of com.android.chimpchat.adb.LinearInterpolator.Point


  }

  @Override
  public void touch(String imageName, TouchPressType pressType)
      throws IOException {
    Point point = findClickPoint(imageName);
    if (null != point) {
      device.touch(point.getX(), point.getY(), TouchPressType.DOWN_AND_UP);
    }
    else{
      //FIXME - Log
    }
  }
View Full Code Here


  }

  @Override
  public void drag(String from, String to, int steps, long distance)
      throws IOException {
    Point fromPoint = findClickPoint(from);
    Point toPoint = findClickPoint(to);
    if(null!=fromPoint && null!=to){
      device.drag(fromPoint.getX(), fromPoint.getY(), toPoint.getX(), toPoint.getY(), steps, distance);
    }
    else{
      //FIXME - Log
    }
View Full Code Here

   * @param imageName
   * @return
   * @throws IOException
   */
  private Point findClickPoint(String imageName) throws IOException {
    Point point = null;
    String actualImageName = imageResolver.getImagePath(imageName);
    Finder finder = getCurrentScreenFinder(device);
    finder.find(actualImageName, 0.7);
    if (finder.hasNext()) {
      Match match = finder.next();
      point = new Point(match.x + (match.w / 2), match.y + (match.h / 2));
    }
    return point;
  }
View Full Code Here

TOP

Related Classes of com.android.chimpchat.adb.LinearInterpolator.Point

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.