O'Reilly logo

Beginning Android Tablet Games Programming by Jeremy Kerfs

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding Tablet Input

For a traditional application, the program usually depends on an input event. What this means is that nothing happens until the user interacts with the app. Most apps have many different menus and text, and the code is responsible for sifting through it as soon as the user presses a button. In these cases, a traditional game loop isn’t necessary because there is nothing to do until a touch event happens. The same principle applies to older programs for phones that didn’t have touchscreens.

If you wish to make this sort of app, Android makes it very simple for you to add listeners to the various buttons and images on the screen. By performing specific actions when a button is pressed, you can manipulate the program’s ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required