Bitmap manipulation demo app
Now that we have studied the theory, let's draw and spin some bitmaps. Create a new project using the Empty Activity template and call it Manipulating Bitmaps
.
Adding the graphic to the project
Right-click and select Copy to copy the bob.png
graphics file from the download bundle in the Chapter 20/Manipulating Bitmaps/drawable
folder.
In Android Studio, locate the app/res/drawable
folder in the project explorer window. This next screenshot makes clear where this folder can be located and what it will look like with the bob.png
image in it:
Right-click on the drawable folder and select Paste to add the bob.png
file to the project. Click OK twice to confirm the default options for importing the file into the project.
Edit the code of the MainActivity
class to include all the required import
directives, the basic version of the Activity
class, and a selection...