I am creating an ArrayAdapter<String> from a resource array. Then I would like to delete an item from the list using arrayAdapter.remove(String) method. I find the correct string using arrayAdapter.getItem(int position). But when I call the remove method I end up having UnsupportedOperationException and I have no clue of whats going on.
on 20th June edited
I did the operation that delete from the resource not directly the adapter and notify the adapter about deletion. I was doing the operation on public boolean onContextItemSelected(MenuItem item); after the deletion on this method, I get an
ArrayAdapter.createViewFromResource(int, View, ViewGroup, int) line: 398
NullPointerException
I think after i delete the item from resources, something is not properly configured..