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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access