I have a list (of messages) and I want to give the user the opportunity to remove these items from the list. I expanded ArrayAdapterand handed him ArrayListmy messages and would like to simply remove the item from this list and then update ListViewinstead of reloading the entire list of sent messages. The problem is that if there is only one message, and I delete it with listAdapter.remove(messageObject), the adapter still calls getView()and then throws NullPointerExceptionseverywhere. I'm not sure the best way to do this.
source
share