budgie
budgie

Reputation: 315

Click event on drawn shapes

Sorry for my english.

Hello, I write the diagram editor program and I don't know how to add click listener or onTouch event to a drawn shape.

For example, I drawn rectangle and for changing it's color I need click on it.

Thanks for replies

Upvotes: 0

Views: 215

Answers (1)

triad
triad

Reputation: 21507

You can attach your drawable onto some type of View (ex: ImageView). Then you can set a clickListener to the ImageView to detect whenever it's been touched.

Upvotes: 1

Related Questions