Interview Questions

You can use the following questions as a guide to consolidate your understanding of this chapter:

  1. What are some differences between onTouchEvent() and onTouch()?
  2. What manifest tag should you use to indicate to Android Market that your application requires a touch screen?
  3. If you want a view to continue to receive touch events in the current touch sequence, do you return true or false from the callback?
  4. What is the first action you’ll receive in a touch sequence?
  5. What is the last action you’ll receive?
  6. True or false: a MotionEvent object is created for every single touch event.
  7. What precautions should you take when using getSize() and getPressure() with MotionEvent objects?
  8. When is it appropriate to recycle a MotionEvent object? ...

Get Pro Android 4 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.