O'Reilly logo

Sams Teach Yourself Android Game Programming in 24 Hours by Jonathan S. Harbour

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

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. ...

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