I am making a simple game in which I draw a set of bitmaps on a Canvas on SurfaceView.
Now in my main activity I have a LinearLayout where I have designed a button.
In the onClick()
of this button I write:
setContentView(new surfaceviewclass(this));
it works fine. It opens the SurfaceView and I play the game etc. But I want to see the button again where I started from I mean when the game is over I want the menu to reappear.. I have already tried calling the void like
main.menu();
but the app crashes.. please help.