Summary

We have learned how to customize the UI of our game using the standard tools, drawables, and views that Android provides. This includes custom fonts, state lists drawables, shape drawables and, especially, custom dialogs that replace the default ones in a way that matches the look and feel of our game.

We also modified the game to include a score and multiple lives. We modified the UI of the GameFragment to display both of them. For that functionality. we extended the game event system to work as an event bus for all the GameObjects.

While the game is starting to look complete, it still feels a bit clunky at times and that is because we are not using any animations. In the next chapter we will learn the different techniques for animations ...

Get Android Game Programming: A Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.