Xamarin.Forms icon indicating copy to clipboard operation
Xamarin.Forms copied to clipboard

[Android] Listview delete item and SwipeView content parent

Open jsuarezruiz opened this issue 4 years ago • 17 comments

Description of Change

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

Issues Resolved

  • fixes #13399

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)

jsuarezruiz avatar Jan 18 '21 11:01 jsuarezruiz

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.

victordscott avatar Feb 15 '21 15:02 victordscott

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

jsuarezruiz avatar Feb 16 '21 12:02 jsuarezruiz

/azp run

jsuarezruiz avatar Mar 04 '21 10:03 jsuarezruiz

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Mar 04 '21 10:03 azure-pipelines[bot]

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.

Zarma13 avatar May 30 '21 14:05 Zarma13

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

jsuarezruiz avatar Jun 16 '21 13:06 jsuarezruiz

@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)

rachelkang avatar Jun 17 '21 17:06 rachelkang

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

thecuong064 avatar Jul 20 '21 03:07 thecuong064

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

hidalgoss avatar Jul 26 '21 16:07 hidalgoss

/azp run

jsuarezruiz avatar Oct 15 '21 11:10 jsuarezruiz

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Oct 15 '21 11:10 azure-pipelines[bot]

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

ShariatPanah avatar Jan 02 '22 18:01 ShariatPanah

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

ShariatPanah avatar Jan 04 '22 11:01 ShariatPanah

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!

RichardVogelij avatar Jan 05 '22 17:01 RichardVogelij

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.

gaurav-bagga avatar Feb 20 '23 06:02 gaurav-bagga

when will this PR be merged?

LennoxP90 avatar Aug 10 '23 15:08 LennoxP90

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

thisisthekap avatar Jan 18 '24 10:01 thisisthekap

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 avatar Apr 25 '24 07:04 jfversluis