Making a Bitmap clickable using onTouchEvent - Android
<p>I've created a SurfaceView and I've put an onTouchEvent on it, and the MotionEvent gets the whole screen, like this:</p>

<pre><code>@Override
 public boolean onTouchEvent (MotionEvent event) {

    if(event.getAction()==MotionEvent.ACTION_DOWN){
        if (!player.getPlaying()&amp;&amp; newGameCreated &amp;&amp; reset) {
            player.setPlaying(true);
            player.fly(true);
            lives = 3;
        }
        if (player.getPlaying()) {
            if (!started) started = true;
            reset = false;
            player.fly(true);
        }
        return true;
    }
    if (event.getAction()==MotionEvent.ACTION_UP) {
        player.fly(false);
        return true;
    }

    // This is inside a class that extends SurfaceView

    return super.onTouchEvent(event);
}
</code></pre>

<p>And I need to check touch on bitmap or not using x-y position of touch and do a different action if the condition is true, how can I do this on this onTouchEvent method?</p>