0
votes

When I select an item in the listview for the second time it is not firing. I am using the ItemSelected property of the listview.

I research about this and found the solution like **setting a null value for the selected item at the end of the code, like below:

 ((ListView)sender).SelectedItem = null;

I am calling a displayactionsheet when tapping on a listview item.** When I set null at the end, the displayactionsheet showing 2 times in the android but working perfectly in uwp section.

Also, try ItemTapped property of listview with a null value at the end. Which is working perfectly in android and breaking the app in UWP. I don't have mac access now, so don't know what will happen at the IOS side.

Is there any solution for this? Thanks in advance

2

2 Answers

2
votes

Solved this issue by setting null value, but not in the code of question, like below:

Mylocationslist.SelectedItem = null;

Mylocationslist is my listview name.

0
votes

It sounds like implementing behaviors on your ListView would solve your issue. check out this Xamarin Blog Post for a tutorial.