title: Android - doing a task while a view is being touched? How?
body: <p>I am trying to make a simple app which does the following.
  There is an ImageView and a SurfaceView for mediaPlay.</p>
  
  <ol>
  <li>If this view is not touched, do nothing.</li>
  <li>If this view is being touched, leave a log message every 100 ms.</li>
  </ol>
  
  <p>Assumption - we have printLogMsg() already available for 2.</p>
  
  <p>So what I am gonna do is to set a onTouchListener to the imageView.
  My question is, how can I perform printLogMsg() within this onTouchListener.</p>
  
  <pre><code>private OnTouchListener mTouchListener = new OnTouchListener() {
      @Override
      public boolean onTouch(View v, MotionEvent event) {
          switch (event.getAction()) {
              case MotionEvent.ACTION_DOWN:
                  Log.d("log", "!!!down");
                  break;
  
              case MotionEvent.ACTION_HOVER_ENTER:
                  Log.d("log", "!!!hover enter");
                  break;
  
              case MotionEvent.ACTION_UP:
                  Log.d("log", "!!!up");
                  break;
          }
  
          return false;
      }
  };
  </code></pre>
  
  <p>I have something like this but touching the ImageView will print "down" just once. Is there a way to do this? Thanks!</p>
  
  <p>Thanks :)</p>