ArrayList.remove(i) doesn't delete all objects as it should
<p>I have a simple listview(recyclerView), where each list-item have a checkbox. All items that is checked should be deleted with this code:</p>

<pre class="lang-java prettyprint-override"><code>for(int i = 0; i&lt;shopListItems.size(); i++) {
    if(shopListItems.get(i).isBought == 1) {
        shopListItems.remove(i);
    }
}
</code></pre>

<p>But for some reason it doesn't. If 10 items are checked, then only 7 of them will be deleted and I have to run the code again to delete the rest. </p>

<p>The code seems fine, but I really don't understand why it doesn't delete all of the checked, or all that are <code>(isBought == 1)</code>.</p>