Android - delete from array adapter <string>
<p>I am creating an <code>ArrayAdapter&lt;String&gt;</code> from a resource array. Then I would like to delete an item from the list using <code>arrayAdapter.remove(String)</code> method. I find the correct string using <code>arrayAdapter.getItem(int position)</code>. But when I call the remove method I end up having <code>UnsupportedOperationException</code> and I have no clue of whats going on.</p>

<p>on 20th June edited<br>
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 </p>

<pre><code>ArrayAdapter.createViewFromResource(int, View, ViewGroup, int) line: 398    

NullPointerException
</code></pre>

<p>I think after i delete the item from resources, something is not properly configured.. </p>
