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.

Xamarin Forms ListView Crashing while scrolling in android only.

AmolGaikwad.5908AmolGaikwad.5908 INUniversity ✭✭


I am developing the app using the xamarin forms.
We have ListView with ContextActions.

Below is listView Configuration

 <ListView x:Name="_ListView" RowHeight="140" CachingStrategy="RecycleElement" 
                RefreshCommand="{Binding LoadUpdatedDataCommand}"
                IsRefreshing="{Binding IsBusy, Mode=OneWay}"
                VerticalOptions="FillAndExpand" BackgroundColor="Transparent"
                SeparatorVisibility="Default" SeparatorColor="#898989"
                AutomationId = "idListView">

here is context action menu

                 MenuItem btnAction = new MenuItem { Text = "titlw", Icon = "btn", IsDestructive = true };
                 btnAction.SetBinding(MenuItem.CommandParameterProperty, new Binding("."));
                 btnAction.AutomationId = "btn1";
                 btnAction.Clicked += Action_Clicked;

Steps To reproduce bug.

Tested Device Name : Samsung Note 2 (Android 4.4.2)

Step 1 : Long Press on cell. After that menu will get visible on top bar.
Step 2: Just Scroll ListView up & Down multiple times & app get crashed.

Appreciate your help. Thanks in advance.


  • AmolGaikwad.5908AmolGaikwad.5908 INUniversity ✭✭

    This appears to be a known bug with Forms when using RecycleElement:

    Xamarin team is aware of the issue. For now, the best workaround would be to have the ListView use RetainElement instead. However, Xamarin team Will keep looking into this to find out potential workaround.


    Amol Gaikwad

Sign In or Register to comment.