7.6. DoodleView Class
The DoodleView
class (Figs. 7.20–7.33) processes the user’s touches and draws the corresponding lines.
1 // DoodleView.java 2 // Main View for the Doodlz app. 3 package com.deitel.doodlz; 4 5 import java.util.HashMap; 6 import java.util.Map; 7 8 import android.content.Context; 9 import android.graphics.Bitmap; 10 import android.graphics.Canvas; 11 import android.graphics.Color; 12 import android.graphics.Paint; 13 import android.graphics.Path; 14 import android.graphics.Point; 15 import android.os.Build; 16 import android.provider.MediaStore; 17 import ...
Get Android™ How to Program, Second Edition 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.