Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

App crashing when listview scrolling

IsaiasRamirezIsaiasRamirez USMember
edited April 2017 in Xamarin.Forms

Recently I just implemented a listview with a custom cell and a custom selector in Xamarin.Forms, my custom cell have two text binding properties and the selector just pick the correct custom cell based on a condition, I fill the listview with several amount of data (+100), it looks like it works correctly, but when I scroll down/up the screen, the app just crashes. I have tried to use CachingStrategy with RecycleElement and RetainElement but the problem remains. Does anyone have the same issue? I'm stuck.

Answers

  • aleks1aleks1 Member ✭✭

    Hi.
    Did you fix the issue ?

  • CharwakaCharwaka INMember ✭✭✭✭✭

    @IsaiasRamirez said:
    Recently I just implemented a listview with a custom cell and a custom selector in Xamarin.Forms, my custom cell have two text binding properties and the selector just pick the correct custom cell based on a condition, I fill the listview with several amount of data (+100), it looks like it works correctly, but when I scroll down/up the screen, the app just crashes. I have tried to use CachingStrategy with RecycleElement and RetainElement but the problem remains. Does anyone have the same issue? I'm stuck.

    do you have any stack trace ??

  • tharindujayanaththarindujayanath Member ✭✭

    change listview CachingStrategy "RetainElement" --> "RecycleElementAndDataTemplate"
    it worked for me

  • MichaelLucasMichaelLucas USMember ✭✭

    Having the same problem and changing CachingStrategy "RetainElement" to "RecycleElementAndDataTemplate" resolves the problem. But no idea why.

Sign In or Register to comment.