Xamarin.forms: [Bug] [iOS]SwipeView not working on Grouped ListView

Created on 31 May 2020  路  6Comments  路  Source: xamarin/Xamarin.Forms

Description

Using Swipeview in a grouped listview not working.
Left or right items are show 0 or only 1 time on the child items.

Steps to Reproduce

This is my list view implementation that works perfect with android
Alerts.xaml













Text="Readed"
BackgroundColor="Red"
Command="{Binding Source={x:Reference AlertsList}, Path=BindingContext.ReadAlertCommand }"
CommandParameter="{Binding .}"/>







                        </SwipeView>
                    </ViewCell>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

Models:
public class GroupedAlertResponseDto : ObservableCollection
{
public DateTime Date { get; set; }

}

public class AlertResponseDto
{
///


/// Gets or sets the field identifier.
///

/// The field identifier.
public Guid FieldId { get; set; }

    /// <summary>
    /// Gets or sets the sensor identifier.
    /// </summary>
    /// <value>The sensor identifier.</value>
    public Guid SensorId { get; set; }

    /// <summary>
    /// Gets or sets the alert identifier.
    /// </summary>
    /// <value>The alert identifier.</value>
    public Guid AlertId { get; set; }

    /// <summary>
    /// Gets or sets the date.
    /// </summary>
    /// <value>The date.</value>
    public DateTime Date { get; set; }

    /// <summary>
    /// Gets or sets if the alert is readed
    /// </summary>
    /// <value>Is Readed</value>
    public bool IsReaded { get; set; }

    /// <summary>
    /// Gets or sets the message.
    /// </summary>
    /// <value>The message.</value>
    public string Message { get; set; }
}
  • Version with issue: 4.7.0.813-pre2
  • Last known good version:
  • IDE:

    • Microsoft Visual Studio Enterprise 2019 Preview Version 16.6.0 Preview 6.0

    • Microsoft Visual Studio for Mac Enterprise 8.6 preview (8.6 build 4446)

  • Platform Target Frameworks:

    • iOS: 12.4, 13.5

    • Android: 9.0

  • Nuget Packages:
    Xamarin.Forms
    Xamarin.Forms.Maps

  • Affected Devices:
    Any iOS device

listview swipeview 4 in-progress iOS 馃崕 bug

All 6 comments

@Rabosa616 I have tried to reproduce the issue without success.
issue10908

This is my sample (is a sample from the Xamarin.Forms Samples repository adding SwipeView)

Issue1908.zip

I tested with Xamarin.Forms 4.6 and 4.7-pre2, could you attach a repro sample?

Hi @jsuarezruiz
try to use this collection:

grouped = new ObservableCollection<GroupedVeggieModel>();
var veggieGroup = new GroupedVeggieModel() { LongName = "vegetables", ShortName = "v" };
var fruitGroup = new GroupedVeggieModel() { LongName = "fruit", ShortName = "f" };
var veggie1Group = new GroupedVeggieModel() { LongName = "vegetables1", ShortName = "v1" };
var fruit1Group = new GroupedVeggieModel() { LongName = "fruit1", ShortName = "f1" };
var veggie2Group = new GroupedVeggieModel() { LongName = "vegetables2", ShortName = "v2" };
var fruit2Group = new GroupedVeggieModel() { LongName = "fruit2", ShortName = "f2" };
veggieGroup.Add(new VeggieModel() { Name = "celery", IsReallyAVeggie = true, Comment = "try ants on a log" });
veggieGroup.Add(new VeggieModel() { Name = "tomato", IsReallyAVeggie = false, Comment = "pairs well with basil" });
veggieGroup.Add(new VeggieModel() { Name = "zucchini", IsReallyAVeggie = true, Comment = "zucchini bread > bannana bread" });
veggieGroup.Add(new VeggieModel() { Name = "peas", IsReallyAVeggie = true, Comment = "like peas in a pod" });
fruitGroup.Add(new VeggieModel() { Name = "banana", IsReallyAVeggie = false, Comment = "available in chip form factor" });
fruitGroup.Add(new VeggieModel() { Name = "strawberry", IsReallyAVeggie = false, Comment = "spring plant" });
fruitGroup.Add(new VeggieModel() { Name = "cherry", IsReallyAVeggie = false, Comment = "topper for icecream" });

veggie1Group.Add(new VeggieModel() { Name = "celery", IsReallyAVeggie = true, Comment = "try ants on a log" });
veggie1Group.Add(new VeggieModel() { Name = "tomato", IsReallyAVeggie = false, Comment = "pairs well with basil" });
veggie1Group.Add(new VeggieModel() { Name = "zucchini", IsReallyAVeggie = true, Comment = "zucchini bread > bannana bread" });
veggie1Group.Add(new VeggieModel() { Name = "peas", IsReallyAVeggie = true, Comment = "like peas in a pod" });
fruit1Group.Add(new VeggieModel() { Name = "banana", IsReallyAVeggie = false, Comment = "available in chip form factor" });
fruit1Group.Add(new VeggieModel() { Name = "strawberry", IsReallyAVeggie = false, Comment = "spring plant" });
fruit1Group.Add(new VeggieModel() { Name = "cherry", IsReallyAVeggie = false, Comment = "topper for icecream" });

veggie2Group.Add(new VeggieModel() { Name = "celery", IsReallyAVeggie = true, Comment = "try ants on a log" });
veggie2Group.Add(new VeggieModel() { Name = "tomato", IsReallyAVeggie = false, Comment = "pairs well with basil" });
veggie2Group.Add(new VeggieModel() { Name = "zucchini", IsReallyAVeggie = true, Comment = "zucchini bread > bannana bread" });
veggie2Group.Add(new VeggieModel() { Name = "peas", IsReallyAVeggie = true, Comment = "like peas in a pod" });
fruit2Group.Add(new VeggieModel() { Name = "banana", IsReallyAVeggie = false, Comment = "available in chip form factor" });
fruit2Group.Add(new VeggieModel() { Name = "strawberry", IsReallyAVeggie = false, Comment = "spring plant" });
fruit2Group.Add(new VeggieModel() { Name = "cherry", IsReallyAVeggie = false, Comment = "topper for icecream" });

grouped.Add(veggieGroup);
grouped.Add(fruitGroup);
grouped.Add(veggie1Group);
grouped.Add(fruit1Group);
grouped.Add(veggie2Group);
grouped.Add(fruit2Group);

This will not fit on the screen and will force to show the scroll.
I think is this the moment where is not working correct.

PS: Thanks for the quick response!

Thanks for the answer @Rabosa616, I have found the problem.

Hi @jsuarezruiz
I麓m glad that I could help you to find the issue!

Let me know when I can test it.

Kind regards.

Thanks so much!
I will try next week on the iPhone when I get the new nugets

I had related issue which the newest Xamarin update seems to have resolved.

Was this page helpful?
0 / 5 - 0 ratings