ArrayAdapter.notifyDataSetChanged() not working when removing items from list
<p>I am not seeing the fully intended functionality of <code>notifyDataSetChanged()</code>.  Renames/modifies work, but removes/deletes do not.
edit:  I am testing on a 4.1.1 phone as well as emulator API 16 (4.1).</p>

<p><code>mylistfragment</code> is my custom ListFragment.</p>

<p><code>myadapter</code> is a standard ArrayAdapter using MyObject.</p>

<p><code>mylist</code> is a ArrayList of MyObject.</p>

<ol>
<li><p>The <strong>working</strong> rename operation:</p>

<pre><code>// rename the db item
mylistfragment.mylist.get(i).name = "new name";
(mylistfragment.myadapter).notifyDataSetChanged(); // this works
</code></pre>

<p>The listview correctly updates to show "new name".</p></li>
<li><p>The <strong>not working</strong> delete operation:</p>

<pre><code>// delete from db
mylistfragment.mylist.get(i).name = "DELETED";
mylistfragment.mylist.remove(i);
(mylistfragment.myadapter).notifyDataSetChanged(); // this does NOT work
</code></pre>

<p>I see the name of the item get changed to "DELETED", which of course means I did not see the item disappear.</p></li>
</ol>

<p>My ArrayList is built from the db when the Fragment is created, so if I recreate my Fragment the item will be gone.  However, I want the item to be gone when I tell the ArrayAdapter to update the views.</p>

<p>Has anyone ever run into this problem or have an idea as to why removing from the arraylist works but isn't reflected by the ListView?</p>
