tags:

views:

63

answers:

1

i am making a canvas and setting its background which is an image i am adding text on it by canvas.Drawtext method which works perfctly alright now i want these text to be clickable but i couldnt find any method

the other method i could think of was to add text box on canvas add write on click event of these text box but could not find any example related to this can anybody suggest what to do

A: 

Canvas is a space where you can just draw some graphics, thus the only way to do what you want is detecting when the user click the surface the canvas is drawn on (e.g. a SurfaceView), and using the coordenates you just fire an event. Of course, you need to verify whether the click was done on the specific part you want (e.g. the area where you drew a button or something).

Cristian