Skip to content Skip to sidebar Skip to footer

Why Can't I Remove An Item?

I am really frustrated because I have been trying this for 4 hours today, and I can't find a solution. For some reason, my on long click listener doesn't get detected sometimes!

Solution 1:

May be try using View.OnItemLongClickListener() instead of AdapterView and change the parameter in OnItemLongClick() to View.

Hope this helps...


Solution 2:

Check if you're actually removing the item from the array inside the adapter.


Solution 3:

Sounds like your listener gets destroyed during a config change, or does not always get initialized. Make sure the code block which setting the listener is part of gets called each time.


Post a Comment for "Why Can't I Remove An Item?"