Self-Review Exercises

  1. 6.1 Fill in the blanks in each of the following statements:

    1. You can create a custom view by extending class View or              .

    2. To process simple touch events for an Activity, you can override class Activity’s onTouchEvent method then use constants from class               (package android.view) to test which type of event occurred and process it accordingly.

    3. Each SurfaceView subclass should implement the interface              , which contains methods that are called when the SurfaceView is created, changed (e.g., its size or orientation changes) or destroyed.

    4. The d in a format specifier indicates that you’re formatting a decimal integer and the f in a format specifier indicates that you’re formatting a(n)               ...

Get Android How to Program, 3/e 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.