Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] disposed object. Object name: 'Xamarin.Forms.Platform.Android.SwipeViewRenderer #11407

Closed
AhmedAbuelnour opened this issue Jul 11, 2020 · 1 comment
Assignees
Labels
a/bindablelayout a/swipeview e/1 🕐 1 i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛

Comments

@AhmedAbuelnour
Copy link

AhmedAbuelnour commented Jul 11, 2020

Description

<ScrollView>
            <StackLayout VerticalOptions="StartAndExpand" >
                <StackLayout BindableLayout.ItemsSource="{Binding CreditCards}" Padding="8" BindableLayout.ItemTemplate="{StaticResource CreditCardTemplate}"/>
                <StackLayout VerticalOptions="End">
                    <buttons:SfButton Style="{StaticResource GradientButton}" Text="Add Card" Command="{Binding AddCardCommand}" >
                        <buttons:SfButton.BackgroundGradient>
                            <gradient:SfLinearGradientBrush>
                                <gradient:SfLinearGradientBrush.GradientStops>
                                    <gradient:SfGradientStop Color="{StaticResource GradientStartColor}" Offset="0"/>
                                    <gradient:SfGradientStop Color="{StaticResource GradientStopColor}" Offset="1"/>
                                </gradient:SfLinearGradientBrush.GradientStops>
                            </gradient:SfLinearGradientBrush>
                        </buttons:SfButton.BackgroundGradient>
                    </buttons:SfButton>
                </StackLayout>
            </StackLayout>

        </ScrollView>


 <DataTemplate x:DataType="models:CreditCard" x:Key="CreditCardTemplate">
            <SwipeView>
                <SwipeView.LeftItems>
                    <SwipeItems Mode="Execute">
                        <SwipeItem Text="Remove" BackgroundColor="Transparent" IconImageSource="delete.png" Command={Binding RemoveCommand}   />
                    </SwipeItems>
                </SwipeView.LeftItems>
                ... 
            </SwipeView>
        </DataTemplate>`

Steps to Reproduce

Try to remove item form the list, produces exception

disposed object. Object name: 'Xamarin.Forms.Platform.Android.SwipeViewRenderer

workaround of it, i had to use collectionview instead of BindableLayout

Basic Information

  • Version with issue: 4.7
  • IDE: VS 2019
@AhmedAbuelnour AhmedAbuelnour added s/unverified New report that has yet to be verified t/bug 🐛 labels Jul 11, 2020
@jsuarezruiz jsuarezruiz self-assigned this Jul 13, 2020
@jsuarezruiz jsuarezruiz added a/swipeview p/Android a/bindablelayout i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often labels Jul 13, 2020
@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Jul 13, 2020

Thanks for the feedback. After complete some tests, can confirm the issue is the same as #11262 and will be fixed by #11279

@jsuarezruiz jsuarezruiz added e/1 🕐 1 and removed s/unverified New report that has yet to be verified labels Jul 13, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Jul 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/bindablelayout a/swipeview e/1 🕐 1 i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛
Projects
None yet
Development

No branches or pull requests

3 participants