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

[Android] Listview delete item and SwipeView content parent #13439

Closed
wants to merge 8 commits into from

Conversation

jsuarezruiz
Copy link
Contributor

Description of Change

Deleting an item, can get already existing content of SwipeView in cells, so the Parent already exists.

Issues Resolved

API Changes

None

Platforms Affected

  • Android

Behavioral/Visual Changes

None

Before/After Screenshots

fix13399

Testing Procedure

Launch Core Gallery and navigate to the issue 13399. Delete items (swipe to open the SwipeView, and tap the delete SwipeItem), without exceptions the test has passed.

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@victordscott
Copy link

I am getting this error using Xamarin.Forms 5.0.0.2012 under a different scenario. I am using the SwipeView control in a list view. When an item in the list view is selected, I navigate to another content page which contains various fields (Entry, Editor, Picker, etc.). The error happens when the user interacts with fields on the subsequent page (not the list view page). Is this fix included in 5.0.0.2012? If so, I may need to report a separate bug.

@jsuarezruiz
Copy link
Contributor Author

@victordscott This PR is pending to be merged, the fix is not yet available in NuGet.

@jsuarezruiz
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Zarma13
Copy link

Zarma13 commented May 30, 2021

Hello I'm having the same issue with a SwipeView Inside a ListView when I try to delete an Item from the ObservableCollection. It's the exact same issue the problem occurs only when I delete an element whitch is not the last one. As I can see the problem wasn't resolved on the 04 March 2021. Is it resolved now ?

Thanks.

@jsuarezruiz
Copy link
Contributor Author

Team, could we include this requested fix in the upcoming Release?

@rachelkang
Copy link
Contributor

@jsuarezruiz I'm having trouble building this branch and keep hitting this issue

/Users/rachelkang/Xamarin.Forms/Xamarin.Forms.Platform.Android/Renderers/ShellToolbarTracker.cs(31,31): Error CS0117: 'Resource.String' does not contain a definition for 'nav_app_bar_open_drawer_description' (CS0117) (Xamarin.Forms.Platform.Android)

@thecuong064
Copy link

Could this fix be available soon, team? I think this is really important since swiping for deleting item is commonly used.

@hidalgoss
Copy link

Any forecast for this bug solution to be added to Nuget?? Seems really important enough to be solved yet.

@jsuarezruiz
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ShariatPanah
Copy link

guys any update on this? I'm getting the same problem

@ShariatPanah
Copy link

I can confirm that this only happens when CachingStrategy is set to RetainElement and when you set it to RecycleElement the problem is gone
hope this help someone

@RichardVogelij
Copy link

I can confirm that this only happens when CachingStrategy is set to RetainElement and when you set it to RecycleElement the problem is gone hope this help someone

Fixed it for me too. Thanks for sharing!

@gaurav-bagga
Copy link

It is surprising this issue was reported in 2021 and still how people are surviving this bug? I tried CachingStrategy trick mentioned above but there was some sluggishness appearing in app.

I tried instead of deleting exact element from the list on delete. I delete it in my local storage then removed all elements in ObservableCollection in reverse and finally added all remaining items one by one.

I don't have a very lengthy list for my use case it is workable. It is working fine, I have to test it for some time, please note I am sharing my solution quite early in development, quick tests passed but as you know unless tested in wild there could be edge cases.

@LennoxP90
Copy link

when will this PR be merged?

@thisisthekap
Copy link
Contributor

@jfversluis Any chance that this one is making it into a Xamarin.Forms service release?

@jfversluis
Copy link
Member

Now that we're so close to the sunsetting of Xamarin.Forms unfortunately we won't be able to take this in anymore, we're really sorry about that. Nevertheless, thank you so much for your time and effort that you have put into this PR.

Please have a look at the evolution of Xamarin.Forms, .NET MAUI. A lot of development has been going on there. Hopefully this issue was already fixed in that codebase. If not, feel free to port this over to there.

Again, thank you so much for being a contributor and Xamarin.Forms user!

@jfversluis jfversluis closed this Apr 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] The specified child already has a parent