XamarinCommunityToolkit
XamarinCommunityToolkit copied to clipboard
[Bug] [ShieldView] [Android] [iOS] ShieldView incorrect height when in grid and with colspan set
Description
I have encountered a bug when using the ShieldView. When in a grid, setting the columnspan cause the height to overflow.
I did some tests by rebuilding the shieldview from scratch and changing some settings to correct this strange behaviour which, as far as i saw, is probably caused by:
- The use of the margin on the labels
- The use of the grid with two auto columns and the individual grids with columns *.
However, I could not understand why one grid is used, with two other grids inside, with the two labels inside. Wouldn't it be better to just use the outer grid and the two labels? Is it possible that I am missing something?
All of this is for Android, I have not yet had time to test it on iOS and UWP. If I can in the next few days I will do some tests on the other platforms.
Edit: Same behaviour happens for iOS.
Link to Reproduction Sample
https://github.com/FedericoNembrini/XamarinCommunityToolkit/tree/shield-view-colspan-issue
Steps to Reproduce
- Add a shield view to a grid with multiple columns and set the column span to the max number of columns
Expected Behavior
View with correct height.
Actual Behavior
View with incorrect height.
Workaround
Workarounds can be found in Reproduction Sample.
Reproduction imagery
- Shield view and reconstructed shield view
- Modified shield view structure