320 likes | 329 Views
This chapter explores threads, handlers, and programmatic movement in Android applications. It covers ANR dialogs, thread basics, final project structure, layout design, digital stopwatch, linear animation, bouncing ball animation, art in motion animation, virtual pet fish, and AsyncTask experiment.
E N D
Chapter 6 Threads, Handlers, and Programmatic Movement
Figure 06.01: An ANR (Application Not Responding) dialogue displayed to the user
Figure 06.02: Thread Basics application shows a simple counter running in a separate thread
Figure 06.04: The layout design shown in the Graphical Layout Editor
Figure 06.06: Project structure for the Stop Watch application
Figure 06.09: Project structure for the Animated Dial application
Figure 06.10: The angle of the rotating dial will be incremented after each delay
Figure 06.11: The SurfaceView object is positioned behind the window of the application
Figure 06.13: Project Structure for the Bouncing Ball application
Figure 06.15: activity_my.xml contains a FrameLayout named frameLayout
Figure 06.18: An Art “Letter” is created as spherical objects are “eased” into a target position
Figure 06.19: A spherical object is eased into a target position
Figure 06.22: The x, y position of spheres on a grid are used to form the letter B
Figure 06.24: Final Project structure for the Virtual Fish application
Figure 06.25: The layout design shown in the Graphical Layout Editor
Figure 06.26: The image of a fish is stored as an XML layout
Figure 06.27: The graphic of foliage is represented as an XML file
Figure 06.28: mDirection refers to the direction a Fish object faces
Figure 06.30: Project structure for the AsyncTask Exploration application