Swipe

Source code in Swipe.zip

  1. SwipeActivity.java
  2. SwipeView.java

Things to try

  1. The touch method of class SwipeView copies the action down motion event by calling obtain:
    	downEvent = MotionEvent.obtain(event);	//copy it
    
    What happens if you change this to
    	downEvent = event;
    
  2. In addition to getting the x and y coördinates of a touch, you can also get the area and pressure. Do something interesting with them.