• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Add Button to SurfaceView

safibaba

Newbie
May 3, 2010
15
0
Is there any way to add a button to a SurfaceView? Ie: I have a class which extends SurfaceView, and I was hoping in my draw routine I could do something like

PHP:
Button button = new Button(getContext());
button.draw(myCanvas);

I've tried various things like this, but although I get no errors, nothing renders to the screen.

Am I barking up the wrong tree?

Thanks
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones