Code example for MotionEvent

Methods: getAction

0
    ); 
 
    // When the button is released, if we're auto decrementing, stop 
    decrement.setOnTouchListener( new View.OnTouchListener() {
      public boolean onTouch(View v, MotionEvent event) {
        if( event.getAction() == MotionEvent.ACTION_UP && autoDecrement ){
          autoDecrement = false;
        } 
        return false; 
      } 
    }); 
  } 
 
  public void increment(){ 
    if( value < mMaximum ){
      value = value + mIncrement;
      valueText.setText( value.toString() );
    } 
  } 
 
  public void decrement(){