Skip to content

Conversation

Amitesh-exp
Copy link

@Amitesh-exp Amitesh-exp commented Sep 16, 2025

Anki.Droid.Issue.Fix.19236.mp4

Purpose / Description

When drawing, if the user tapped with another finger to change the brush color, the stroke would continue instead of ending. This caused unexpected merging of strokes with the wrong color.

Fixes

Approach

  • Added handling for ACTION_POINTER_DOWN in onTouchEvent
  • Now, whenever a second finger touches the screen while drawing, the current stroke is finalized (drawFinish()), isCurrentlyDrawing is reset, and the brush change is applied cleanly.
  • This ensures multi-touch interactions stop the ongoing stroke before switching brush color.

How Has This Been Tested?

  • Tested on Physical Device
  • Drew with one finger, then tapped another finger to change color.
  • Verified that the stroke ended before color switch.
  • Confirmed new strokes started fresh with the new brush color.

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This fix is for the deprecated Whiteboard, the issue was logged against the Whiteboard in the new study screen: WhiteboardFragment.kt

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Sep 17, 2025
@Amitesh-exp Amitesh-exp closed this by deleting the head repository Sep 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Author Reply Waiting for a reply from the original author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Whiteboard] While drawing, it’s possible to press the buttons.
2 participants