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 and leave the rest of the settings at their defaults.
Similar to the two drawing apps from the previous chapter, this app consists of Kotlin files only, and no layout files. The Kotlin files and all the code up to the end of this chapter can all be found in the Chapter21
folder of the download bundle. The complete project can be found in the Chapter22
folder of the download bundle.
Next, we will create empty classes that we will code throughout the project over the next two chapters. Create a new class called LiveDrawingView
, a new class called ParticleSystem,
and a new class called Particle
.