7.2.3. Drawing with Canvas and Bitmap
This app draws lines onto Bitmaps (package android.graphics
). You can associate a Canvas
with a Bitmap
, then use the Canvas
to draw on the Bitmap
, which can then be displayed on the screen (Section 7.6). A Bitmap
can also be saved into a file—we’ll use this capability to store drawings in the device’s gallery when you touch the Save option.
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.