Skip to content

Instantly share code, notes, and snippets.

@hitapia
Created December 22, 2015 06:49
Show Gist options
  • Select an option

  • Save hitapia/7dfa2afabd4562d8b19c to your computer and use it in GitHub Desktop.

Select an option

Save hitapia/7dfa2afabd4562d8b19c to your computer and use it in GitHub Desktop.
Delete items in ArrayList - Android
private ArrayList<Keyword> items = new ArrayList<Keyword>();
private void DelItems(ArrayList<String> delid){
Iterator<Keyword> iter = items.iterator();
while (iter.hasNext()) {
if (delid.contains(((Keyword)iter.next()).id)) {
iter.remove();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment