[Material3] Expose Material Handlers and Helpers as Public#35323
Merged
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35323Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35323" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR exposes the Android Material 3 (“Handler2”) handler types, related platform controls, and helper/extension APIs as public surface area to enable downstream customization and extension scenarios (per #35124 / .NET 11 planning).
Changes:
- Changed a set of Material3 handler types (e.g.,
*Handler2) and related listener classes frominternaltopublic. - Changed several Android platform controls (
MauiMaterial*) and Android helper/extension methods (Picker/SearchBar/Switch/DatePicker/TimePicker) frominternaltopublic. - Updated
PublicAPI.Unshipped.txtentries for both Core and Controls Android TFMs to reflect the newly-public APIs.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt | Declares newly-public Android Core APIs (Material3 handlers, platform controls, and helper methods). |
| src/Core/src/Platform/Android/TimePickerExtensions.cs | Makes Material3 MauiMaterialTimePicker extension methods public. |
| src/Core/src/Platform/Android/SwitchExtensions.cs | Makes Material3 MaterialSwitch thumb/track color helpers public. |
| src/Core/src/Platform/Android/SearchViewExtensions.cs | Makes Material3 SearchBar-related extension helpers public. |
| src/Core/src/Platform/Android/PickerExtensions.cs | Makes Material3 picker helper/“core” extension methods public. |
| src/Core/src/Platform/Android/MauiMaterialTimePicker.cs | Makes MauiMaterialTimePicker public. |
| src/Core/src/Platform/Android/MauiMaterialSearchBarTextInputLayout.cs | Makes Material3 SearchBar TextInputLayout and TextInputEditText public. |
| src/Core/src/Platform/Android/MauiMaterialContextThemeWrapper.cs | Makes MauiMaterialContextThemeWrapper public to support external theming usage. |
| src/Core/src/Platform/Android/MaterialActivityIndicator.cs | Makes MaterialActivityIndicator public. |
| src/Core/src/Platform/Android/Material3Controls/MauiMaterialTextView.cs | Makes MauiMaterialTextView public. |
| src/Core/src/Platform/Android/Material3Controls/MauiMaterialPicker.cs | Makes MauiMaterialPicker / MauiMaterialPickerBase public. |
| src/Core/src/Platform/Android/Material3Controls/MauiMaterialEditText.cs | Makes MauiMaterialEditText / MauiMaterialTextInputLayout public. |
| src/Core/src/Platform/Android/Material3Controls/MauiMaterialDatePicker.cs | Makes MauiMaterialDatePicker public. |
| src/Core/src/Platform/Android/DatePickerExtensions.cs | Makes Material3 MauiMaterialDatePicker extension methods public. |
| src/Core/src/Handlers/TimePicker/TimePickerHandler2.Android.cs | Makes TimePickerHandler2 and its listener types public. |
| src/Core/src/Handlers/Switch/SwitchHandler2.Android.cs | Makes SwitchHandler2 public. |
| src/Core/src/Handlers/Slider/SliderHandler2.Android.cs | Makes SliderHandler2 public. |
| src/Core/src/Handlers/SearchBar/SearchBarHandler2.Android.cs | Makes SearchBarHandler2 public. |
| src/Core/src/Handlers/RadioButton/RadioButtonHandler2.Android.cs | Makes RadioButtonHandler2 public. |
| src/Core/src/Handlers/ProgressBar/ProgressBarHandler2.Android.cs | Makes ProgressBarHandler2 public. |
| src/Core/src/Handlers/Picker/PickerHandler2.Android.cs | Makes PickerHandler2 public. |
| src/Core/src/Handlers/Label/LabelHandler.Android.cs | Makes LabelHandler2 public. |
| src/Core/src/Handlers/Image/ImageHandler2.Android.cs | Makes ImageHandler2 public. |
| src/Core/src/Handlers/Entry/EntryHandler2.Android.cs | Makes EntryHandler2 public. |
| src/Core/src/Handlers/Editor/EditorHandler2.Android.cs | Makes EditorHandler2 public. |
| src/Core/src/Handlers/DatePicker/DatePickerHandler2.Android.cs | Makes DatePickerHandler2 and its listener types public. |
| src/Core/src/Handlers/ActivityIndicator/ActivityIndicatorHandler.Android.cs | Makes ActivityIndicatorHandler2 public. |
| src/Controls/src/Core/SearchBar/SearchBar.Android.cs | Makes the Material3 SearchBarHandler2 overload mapper public. |
| src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt | Declares newly-public Controls Android APIs for the new public mappers. |
| src/Controls/src/Core/Entry/Entry.Android.cs | Makes EntryHandler2-specific mapper overloads public. |
| src/Controls/src/Core/Editor/Editor.Android.cs | Makes EditorHandler2-specific mapper overload public. |
kubaflo
approved these changes
May 7, 2026
This was referenced May 8, 2026
This was referenced Jun 7, 2026
jfversluis
added a commit
to dotnet/docs-maui
that referenced
this pull request
Jun 12, 2026
* Document public Material 3 helper types in .NET MAUI 11 Adds a "Customize Material 3 controls" section that enumerates the Microsoft.Maui.Platform Material 3 helper types now exposed as public in .NET MAUI 11 (MauiMaterialEditText, MauiMaterialPicker, MauiMaterialDatePicker, MauiMaterialTimePicker, MauiMaterialTextView, MauiMaterialSearchBarTextInputLayout, MaterialActivityIndicator, MauiMaterialContextThemeWrapper). Includes a handler-customization example that subclasses MauiMaterialEditText for Entry. Tracks dotnet/maui#35323 and aligns with the .NET 11 Preview 5 release notes published in dotnet/core#10433. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix Material 3 validation xrefs Replace unresolved xrefs for newly public .NET 11 Material 3 helper and Handler2 types with code spans so OPS validation doesn't warn before the API reference includes them. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com> Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Descripton of Change
This pull request makes a set of Material 3 controls and related handler classes public, transitioning them from internal to public API. This is part of the planned public API exposure for .NET 11, allowing developers to directly use and extend these Material 3 controls and handlers in their Android applications.
Fixes #35124
Material 3 Handler and Control Classes Now Public:
ActivityIndicatorHandler2,DatePickerHandler2,EditorHandler2,EntryHandler2,ImageHandler2,LabelHandler2,PickerHandler2,ProgressBarHandler2,RadioButtonHandler2,SearchBarHandler2,SliderHandler2,SwitchHandler2,TimePickerHandler2MaterialDatePickerPositiveButtonClickListener,MaterialDatePickerDismissListener,MaterialTimePickerPositiveButtonClickListener,MaterialTimePickerDismissListener.MauiMaterialDatePicker,MauiMaterialEditText,MauiMaterialTextInputLayout.Public API Surface Updates:
PublicAPI.Unshipped.txtto include the newly public methods onEditor,Entry, andSearchBar.Mapping and Extension Methods Now Public:
MapTextandMapImeOptionsforEditorHandler2,EntryHandler2, andSearchBarHandler2.MauiMaterialDatePickerpublic:UpdateDate,UpdateFormat, andUpdateTextColor.These changes collectively make Material 3 controls and handlers available for public use and extension, as planned for .NET 11.