android-kotlin-drawing-canvas
android-kotlin-drawing-canvas copied to clipboard
Advanced Android in Kotlin: Canvas Objects 2.2 [Step 6][Storing data in a Path incorrect task instrusctions]
Describe the problem As mentioned in Task (optional): Storing data in a Path step 1 & 2, after removing code for extraCanvas and extraBitmap, and adding the drawing and curPath path, the output is not the same. Nothing is been drawn on touching the canvas.
In which lesson and step of the codelab can this issue be found? Advanced Android in Kotlin 02.2: Drawing on Canvas Objects, Step 6.
How to reproduce? Remove the code as mentioned in Step 6 Optional task and add the code for storing path as Path.
Versions
- Android Studio 4.2.2
- API Target level 30
Additional information As mentioned in the task, we are removing code related to extraCanvas, I assume that in the fun touchMove(), as we remove the line extraCanvas.drawPath(path, paint), there should be some code about adding/drawing the path.
codelab: advanced-android-kotlin
here is the code for the optional step: https://github.com/mir47-nd940/android-kotlin-drawing-canvas/blob/miro/app/src/main/java/com/example/android/minipaint/CustomCanvasView.kt