5 Doodlz App
Objectives
In this chapter you’ll:
Detect when the user touches the screen, moves a finger across the screen and removes a finger from the screen.
Process multiple touches so the user can draw with multiple fingers at once.
Use a
SensorManager
and the accelerometer to detect motion events.Use a
Paint
object to specify the color and width of a line.Use
Path
objects to store each line’s data and use aCanvas
to draw each line into aBitmap
.Create a menu and display menu items on the app bar.
Use the printing framework and the Android Support Library’s
PrintHelper
class to enable the user to print a drawing.Use Android 6.0’s new permissions model to request permission for saving an image to external storage.
Add libraries to ...
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.