Additional Exercises

1. Change the speed of the ball so that it slows down and stops after it is flung. Experiment with different speeds and see which is optimal for how you would like the app to function.

2. Change the color and size of the ball and the canvas, seeing how different iterations look (see Figure 5.14). Use this as an opportunity to see how these changes impact both the look and the functionality of the app.

Image

Figure 5.14 Different colors and sizes of the canvas.

Get Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps 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.