onTouchListener inconsistent when on hold?
<p>I have text field which has an onTouchListener attached to it. When i touch the text, ACTION_DOWN is fired and the text becomes black from its default white. And then I untouch ACTION_UP is fired and the text goes back to white. </p>

<p>However now when I touch and hold the text becomes black and stays like that, I want it so that when i touch and hold it should become black and then white again even while my finger is touching it.</p>

<p>How can I do that!? </p>

<p>I tried using some like this:</p>

<pre><code>boolean clicked = true;

    textfield.setOnTouchListener(new OnTouchListener(){
        public void onTouch(View v, MotionEvent e){
           if(m.getAction() == MotionEvent.ACTION_DOWN){
             if(clicked){
                // do something
                clicked = false;
             }
           if(m.getAction() == MotionEvent.ACTION_UP){
                clicked = true;
           }
        }
    }
</code></pre>

<p>it doesnt work for some reason!!</p>
