7.10. Wrap-Up
In this chapter, you built the Doodlz app which enables users to paint by dragging one or more fingers across the screen. You implemented a shake-to-erase feature by using Android’s SensorManager to register a SensorEventListener that responds to accelerometer events, and you learned that Android supports many other sensors.
You created subclasses of DialogFragment that displayed custom Views in AlertDialogs. You also overrode the Fragment lifecycle methods onAttach and onDetach, which are called when a Fragment is attached to or detached from a parent Activity, respectively.
We showed how to associate a Canvas with a Bitmap, then use the Canvas to draw on the Bitmap. We demonstrated how to handle multitouch events so the user ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access