title: Know the time that a button is Holding
body: <p>I want that when you are holding a button during 3 secs do something, I try with the code above but it only do semething when I stop holding not during the hold. Should I implement a listener or something like this?</p>
  
  <pre><code>finishPushing = true;
  .
  .
  .    
  
  button.setOnTouchListener(new OnTouchListener()
              {
  
                  @Override
                  public boolean onTouch(View v, MotionEvent event) {
  
                      if(android.os.SystemClock.elapsedRealtime() - event.getDownTime() &gt; 3000 &amp;&amp; (event.getPointerCount() == 1) &amp;&amp; finishPushing)
                      {
                          // Do something                     
  
                          finishPushing = false;
                      }
                      else{
                          finishPushing = true;
                      }
                      return false;
                  }
  
              });
  </code></pre>