title: using onLongClickListener to change values quickly
body: <p>I'm trying to create a set of buttons that will change a value up or down by 1 with a single tap, and change the value quickly by holding the button. I can't figure out how to get the value to change quickly. Here's what I have:</p>
  
  <pre><code>    btPlus.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View view) {
          mTempo=mTempo+1;
          setTempo(mTempo + 1);
          tvTempo.setText(Integer.toString(mTempo));
        }  
      });
      btPlus.setOnLongClickListener(new View.OnLongClickListener() {
          @Override
          public void onLongClick(View view) {
              mTempo = mTempo + 1;
              setTempo(mTempo + 1);
              tvTempo.setText(Integer.toString(mTempo));
          }
      });                              
      btMinus.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              mTempo=mTempo-1;
              setTempo(mTempo - 1);
              tvTempo.setText(Integer.toString(mTempo));
          }
      });
      btMinus.setOnLongClickListener(new View.OnLongClickListener() {
          @Override
          public void onLongClick(View view) {
              mTempo = mTempo - 1;
              setTempo(mTempo - 1);
              tvTempo.setText(Integer.toString(mTempo));
          }
      });    
      return rootView;
  }
  </code></pre>
  
  <p>Thanks for your help.</p>