Surfaceview and best practise

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Surfaceview and best practise

Postby wellsbrad » Thu Sep 03, 2009 12:52 pm

I am developing a game , I used the gametemplate by MrSnowflake. Thus
I have a GameView extending the SurfaceView with a thread that handles
the drawing etc. I need 4 buttons at the bottom of the screen. These
will only use touch events, the game will not use d-pad or trackball

My questions :

1) Should the surfaceview draw and handle the "button" touch presses?
Or should i add button views to the parent activity, and those button
views will handles the touch presses?

2) What is the best practise for layouts for games where surfaceview's
are extended?

3) How does one change the size of the canvas thats provided via doDraw
(). Currently the canvas is filling the screen not allowing me to see
the button views that are below the surfaceview.
Once Poster
Once Poster
Posts: 1
Joined: Wed Aug 19, 2009 1:14 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests