Hour 9. Multi-Touch User Input

What You’ll Learn in This Hour

• Using single-touch input

• Listening for touch inputs

• Using multi-touch input

This hour covers the touchscreen: getting both single and multiple touch events from an Android device. Although Android supports a soft keyboard and a hardware keyboard (via Bluetooth or USB), we will concern ourselves only with touch-screen input because that is the most prevalent form of input on Android 4.0 devices.

Single-Touch Input

There are several ways to get user input on an Android device. The most common form of input on the newest devices is with a multi-touch-capable screen. Additionally, Android supports input via keyboard. The accelerometer and compass might be considered inputs as well. ...

Get Sams Teach Yourself Android Game Programming in 24 Hours 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.