CommunityToolkit / CommunityToolkit/Maui

[BUG] [Android] DrawingView binding fails after switching tab

Open
#1,879 7 comments 0 reactions 0 assignees View on GitHub
area/views bug unverified
Dominant language
C#
Stars
2.7k
Forks
500
Avg merge
2d 14h
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Did you read the "Reporting a bug" section on Contributing file?

- [X] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug

### Current Behavior

DrawingView bindings work as expected when starting the app, but after switching the binding is no longer working on Android. On iOS the DrawingView works as expected, also after switching tabs.

### Expected Behavior

DrawingView bindings like `Lines` and `DrawingLineCompletedCommand` keep working after switching tabs.

### Steps To Reproduce

1. Open and run reproduction project on Android.
2. Draw line and observe that binding works.
3. Switch to second tab.
4. Switch back to main (first) tab.
5. Draw line and observe that binding fails.

### Link to public reproduction project repository

https://github.com/kramer-e/DrawingView_Bug

### Environment

```markdown
- .NET MAUI CommunityToolkit: 8.0.0 & 9.0.0
- OS: Android 14 (API 34)
- .NET MAUI: 8.0.21
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked DrawingView_Bug reproduction project and run it on Android 14. Follow the tab-switching steps, then inspect the DrawingView binding behavior after returning to the first tab. Done means Lines and DrawingLineCompletedCommand still work after switching tabs, matching iOS behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.