Using an Android Long-Button press to increment/decrement counter
<p>I want to be able to press a button on my program and hold it down (without releasing) to increment a variable. Problem I am having right now is when I conduct the long button press it only runs once, until I release and press again.  </p>

<p>First I want to find out if there is a way to do this without having to use the OnTouchListener, and just using the OnLongClick. Is there a way to check the value of the button? For example.. buttondown=true; Conduct a whileloop to increment until the button is released.</p>

<p>Second, I don't want the updates to be delayed, because the incremented value is being drawn as the user holds down the button.</p>

<p>Basically I am doing something like this:</p>

<pre><code>btn_resume.setOnLongClickListener(new OnLongClickListener() {
public boolean onLongClick(View v) {


..code..
return true;

        }
    });
</code></pre>
