Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inaccurate Example in Handlers Documentation - Android Button Mapping #2726

Closed
bhavanesh2001 opened this issue Jan 13, 2025 · 1 comment · Fixed by #2727
Closed

Inaccurate Example in Handlers Documentation - Android Button Mapping #2726

bhavanesh2001 opened this issue Jan 13, 2025 · 1 comment · Fixed by #2727
Assignees
Labels
doc-bug Problem with the content; needs to be fixed [org] dotnet-maui/subsvc dotnet-mobile/svc Pri2 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@bhavanesh2001
Copy link
Contributor

bhavanesh2001 commented Jan 13, 2025

Type of issue

Outdated article

Description

Description:
The handlers documentation uses the Button as an example to explain how handlers map cross-platform controls to native platform views. The documentation claims that:

On Android, the Button is mapped to an AppCompatButton.

However, the actual implementation in the source code maps the Button to a MaterialButton, as seen here

This discrepancy between the documentation and the actual implementation can mislead developers referencing the handlers documentation.

Suggested Fix:

  • Update the text in the handlers documentation to state that MaterialButton is used as the native view on Android.
  • Replace image showing an AppCompatButton with image correctly depicting a MaterialButton.

Since Image is involved, I couldn't raise a PR.

Page URL

https://learn.microsoft.com/en-us/dotnet/maui/user-interface/handlers/?view=net-maui-9.0

Content source URL

https://github.com/dotnet/docs-maui/blob/main/docs/user-interface/handlers/index.md

Document Version Independent Id

68990f2c-45ae-8d81-24cc-4004a2fa994c

Article author

@davidbritch

Metadata

  • ID: 68990f2c-45ae-8d81-24cc-4004a2fa994c
  • Service: dotnet-mobile
  • Sub-service: dotnet-maui

Related Issues


Associated WorkItem - 362781

@dotnetrepoman dotnetrepoman bot added the ⌚ Not Triaged Not triaged label Jan 13, 2025
@davidbritch davidbritch added the doc-bug Problem with the content; needs to be fixed [org] label Jan 13, 2025
@dotnetrepoman dotnetrepoman bot removed the ⌚ Not Triaged Not triaged label Jan 13, 2025
@davidbritch davidbritch added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Jan 13, 2025
@davidbritch davidbritch self-assigned this Jan 13, 2025
@davidbritch
Copy link
Contributor

I wondered why my Button handler code still worked. It's because MaterialButton inherits from AppCompatButton.

@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-bug Problem with the content; needs to be fixed [org] dotnet-maui/subsvc dotnet-mobile/svc Pri2 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants