Creating the Live Drawing project
To get started, create a new project in Android Studio and call it Live Drawing
. Use the Empty Activity project.
Now we will consider the name of the files and the screen real estate. In this project, we will learn something new. It is not always appropriate to use the default name for our Activity class. In this project, the Activity class isn't going to be the most significant class and MainActivity
doesn't seem like an appropriate name. Let's rename it.
Refactoring MainActivity to LiveDrawingActivity
It is a good practice to use meaningful names for all the different parts of our code. For this project, I think MainActivity
is a bit vague and inconclusive. We could make do with it, but let's rename it to something more meaningful. This will also let us see how we can use the refactoring tool of Android Studio. The reason that we use the term refactoring instead of just renaming is when we change the names we use in...