Android: how to place a button at an x,y position over top of Canvas

Posted by Ben Mc on Stack Overflow See other posts from Stack Overflow or by Ben Mc
Published on 2010-04-16T03:50:48Z Indexed on 2010/04/16 3:53 UTC
Read the original article Hit count: 635

Filed under:
|
|

Is it possible to place buttons at an X,Y position over the top of a Canvas?

For example, on the opening screen of my game, I would like to place buttons for "Play Now", "Instructions", etc, right on top of the canvas.

Right now, I'm looking at Touch locations on the Canvas and comparing them to various X,Y bounds. It works, but adding a button with a click listener would probably be much more efficient.

© Stack Overflow or respective owner

Related posts about android

Related posts about canvas