How to set onTouchEvent on Bitmap image using canvas.
<p>i'm new in android development. I wanted to set onTouchEvent particularly for an image. so that i can do some work ,like increase score etc....</p>

<p>Here is the sample code i tried..</p>

<pre><code>    @Override
protected void onDraw(Canvas canvas) 
{
          canvas.drawBitmap(image1, random.nextInt(455), random.nextInt(270), paint);
          canvas.drawText("SCORE = "+score, 10, 20, paint);
    }

     @Override
public boolean onTouchEvent(MotionEvent event) 
{
    // TODO Auto-generated method stub

    if(toggelFlag)
    {
        score = score+10;

    }

    return super.onTouchEvent(event);

}
</code></pre>

<p>Actually i wanted to increase the score once i touch the image only. But here if i touch anywhere in the screen its increase the score. I want it for image only.</p>
