xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.63k stars 1.87k forks source link

[Bug] Threshold property only works for the first swipe item and will hide other items. #13619

Open yuyully opened 3 years ago

yuyully commented 3 years ago

Description

I'm trying to use Threshold property while adding more than one swipe items, however it doesn't work. Threshold property only works for the first swipe item.

Steps to Reproduce

  1. Create a Mobile App (Xamarin.Forms) - Flyout project > Update Xamarin.Forms package to latest 5.0
  2. Open AboutPage.xaml, then add the following code
    <SwipeView Threshold="200">
    <SwipeView.LeftItems>
        <SwipeItems>
            <SwipeItem Text="Favorite" BackgroundColor="LightGreen" />
            <SwipeItem Text="Delete" BackgroundColor="LightPink"/>
        </SwipeItems>
    </SwipeView.LeftItems>
    <Grid HeightRequest="60" WidthRequest="300" BackgroundColor="LightGray">
        <Label Text="Swipe right" HorizontalOptions="Center" VerticalOptions="Center" />
    </Grid>
    </SwipeView>
  3. Debugging with android project

Expected Behavior

There should be two SwipeItem showing with Threshold="200".

Actual Behavior

There is only the first item showing up and the second one is missing. If I delete Threshold property, items work fine.

rachelkang commented 3 years ago

Hi, @v-yuyul - thanks for submitting this issue! I'm able to see the behavior you shared on both Android and iOS Issue13619.zip

@jsuarezruiz do you have any ideas?

jsuarezruiz commented 3 years ago

@v-yuyul, @rachelkang Thanks for the feedback, the issue will be fixed by #13651