Android: Layouts and views or a single full screen custom view?

Posted by futlib on Game Development See other posts from Game Development or by futlib
Published on 2011-02-20T15:32:23Z Indexed on 2011/02/20 23:33 UTC
Read the original article Hit count: 276

Filed under:
|

I'm developing an Android game, and I'm making it so that it can run on low end devices without GPU, so I'm using the 2D API. I have so far tried to use Android's mechanisms such as layouts and activities where possible, but I'm beginning to wonder if it's not easier to just create a single custom view (or one per activity) and do all the work there.

Here's an example of how I currently do things: I'm using a layout to display the game's background as an image view and the square game area, which is a custom view, centered in the middle.

What would you say? Should I continue to use layouts where possible or is it more common/reasonable to just use a large custom view? I'm thinking that this would probably also make it easier to port my code to other platforms.

© Game Development or respective owner

Related posts about android

Related posts about best-practices