How can I execute some code while a view is pressed (held down) Android
<p>I'm writing a small app and I need to run some code while the user holds down a screen button, an ImageView to be more precise. I have tried with onTouchEvent, but the code only executes in an actual event (down, up or move).</p>

<p>I would like my code to execute while I hold the button down. Any idea on how to do this?
<hr/>
This is what I tried</p>

<pre><code>myImageView.setOnLongClickListener (new OnLongClickListener()
        {
            @Override
            public boolean onLongClick(View view) 
            {
                Log.i("TAG","FOO");
                return true;
            }
        });
</code></pre>

<p>What I want is for FOO to be printed over and over while I hold down the button/screen.</p>
