[SearchPage][Android] Fix bug where ScrollableHeader were not added.#820
Open
[SearchPage][Android] Fix bug where ScrollableHeader were not added.#820
ScrollableHeader were not added.#820Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Android-specific behavior in SearchPage where ScrollableHeader was not being displayed because HeaderTemplate takes precedence over Header on Android.
Changes:
- Bind
CollectionView.Headerto the pageBindingContextto ensure the header template is realized. - Switch from assigning
Headerto assigningHeaderTemplatewhenScrollableHeaderchanges. - Add a patch entry to
CHANGELOG.mdfor version55.3.1.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/library/DIPS.Mobile.UI/Components/Searching/SearchPage.cs |
Adjusts CollectionView header binding/templating to make ScrollableHeader appear on Android. |
CHANGELOG.md |
Adds a 55.3.1 patch note for the Android SearchPage fix. |
| HeaderTemplate = new DataTemplate(() => new Grid { Padding = new Thickness(0, Sizes.GetSize(SizeName.content_margin_large), 0, 0) }) | ||
| }; | ||
|
|
||
| m_resultCollectionView.SetBinding(StructuredItemsView.HeaderProperty, static (SearchPage searchPage) => searchPage.BindingContext, source: this); |
Comment on lines
261
to
264
| private void OnScrollableHeaderChanged() | ||
| { | ||
| m_resultCollectionView.Header = ScrollableHeader; | ||
| m_resultCollectionView.HeaderTemplate = new DataTemplate(() => ScrollableHeader); | ||
| } |
| @@ -1,3 +1,6 @@ | |||
| ## [55.3.1] | |||
| - [SearchPage][Android] Fix bug where `ScrollableHeader` were not added. | |||
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.
Description of Change
HeaderTemplate overrides Header on Android, so we just use HeaderTemplate here