Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 12. 2D and 3D drawing > Drawing with the 2D libraries

12.1. Drawing with the 2D libraries

Android applications use activities and there can be only one active Activity at any given time. The Activity holds the SurfaceView where we place our UI elements. The SurfaceView is nothing more than a window that we interact with via touching (if supported) and drawing on its surface. The drawing surface is the Canvas.

We can draw any 2D shape we want on the Canvas. It supports coloring, drawing, text, geometries, images, and applying various filters and transformations. We’ll review all of these as we take a look at the 2D library capabilities using the Canvas.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial