Chapter 16. Touchscreens

Many Android devices incorporate touchscreens. When a device does not have a physical keyboard, much of the user input must come through the touchscreen. Therefore your applications will often need to be able to deal with touch input from the user. You've most likely already seen the virtual keyboard that displays on the screen when text input is required from the user. We used touch with mapping applications in Chapter 7 to pan the maps sideways. These implementations of the touchscreen interface have been hidden from you so far, but now we'll show you how to take advantage of the touchscreen.

This chapter is made up of four major parts. The first section will deal with MotionEvent objects, which is how Android tells an ...

Get Pro Android 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.