android-kotlin-drawing-canvas icon indicating copy to clipboard operation
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]

Open chintanrparmar opened this issue 4 years ago • 1 comments

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

  1. Android Studio 4.2.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

chintanrparmar avatar Jul 27 '21 00:07 chintanrparmar

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

Tarek-Bohdima avatar Jan 18 '22 17:01 Tarek-Bohdima