Headless Layouts are causing crashing and graphics glitches in Cells
#4168 aperta il 22 ott 2018
Metriche repository
- Star
- (5644 stelle)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
Description
When I use a headless layout inside of a cell, it would cause a graphical glitch where the data that was previously in the cell would show up under or on top of the new data in the cell. This became a jumbled mess.
When I used more labels and an FFImageLoading CachedImage, it would just crash the app with the below exception. I should probably test this in iOS as well.
Removing the CompressedLayout.IsHeadless="True" fixes both problems.
Steps to Reproduce
- Create Custom ViewCell
- Use StackLayouts
- Add a label with bound data to the StackLayout
- Assign CompressedLayout.IsHeadless="True" to the StackLayout
Expected Behavior
For the application not to crash and display bound data in the cell.
Actual Behavior
When using ffimageloading cached images and formatted string, the application crashes with this exception:
Unhandled Exception:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index occurred
When using just a basic label by itself, the previous use label used in that cell would appear over the new data in the label. It became a jumbled messed.
Basic Information
- Version with issue: 3.3.0.912540
- Last known good version:
- IDE: Visual Studio 2017 15.8.7
- Platform Target Frameworks:
- iOS:
- Android: 8.1 Oreo
- UWP:
- Android Support Library Version:
- Nuget Packages: Xamarin.FFImageLoading.Forms 2.4.3.840
- Affected Devices: Emulator
Screenshots
https://1drv.ms/u/s!AgoxySKwbTmmpq1aJioVGraINndXNA
Reproduction Link
https://gist.github.com/seansparkman/560624cba6608eaa25831e59fcee7c71