maui
maui copied to clipboard
[Android] Fix incorrect height of CollectionView when ItemsSource is empty.
Root Cause:
- The
ItemSpacingwas set in theMauiRecyclerVieweven when theItemsSourcewasnull. As a result, the default padding occupied space in theMauiRecyclerView.
Description of Change:
- The
ItemSpacing(padding) should only be applied if theItemsCountis greater than zero. Otherwise, padding should not be applied.
Issues Fixed
Fixes #23148
| Before Issue Fix | After Issue Fix |
|---|---|
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
I haven't been able to reproduce the original issue.
Here I'm running the code from the original issue against our sandbox.
I'll test again once tests are added to see how you are reproducing this one.
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
@PureWeen, I can reproduce the issue with the latest source as well. I'm using Visual Studio and an API 31 Pixel 5 emulator. We're testing this in the main branch, not with .net9. I hope this information helps.
@PureWeen ,I have reproduced the issue using the latest dotnet maui main repository. The problem persists across API levels 31, 33, 34, and 35 on our emulators. For further reference, I've also attached a video demonstrating the issue.
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase
/rebase
/azp run
Azure Pipelines successfully started running 3 pipeline(s).