6.13 CannonView
Subclass of SurfaceView
Class CannonView
(Figs. 6.19–6.33) is a custom subclass of View
that implements the Cannon Game’s logic and draws game objects on the screen.
6.13.1 package
and import
Statements
Figure 6.19 lists the package
statement and the import
statements for class CannonView
. Section 6.3 discussed the key new classes and interfaces that class CannonView
uses. We’ve highlighted them in Fig. 6.19.
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.