xamarin/Xamarin.Forms

Headless Layouts are causing crashing and graphics glitches in Cells

Ouverte

#4 168 ouverte le 22 oct. 2018

 (2 commentaires) (0 réaction) (0 personne assignée)C# (1 926 forks)batch import
a/layoute/6 :clock6:help wantedi/highp/Androidup-for-grabs

Métriques du dépôt

Stars
 (5 644 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

  1. Create Custom ViewCell
  2. Use StackLayouts
  3. Add a label with bound data to the StackLayout
  4. 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

Guide contributeur