Skip to content

Instantly share code, notes, and snippets.

@muratcanbur
Created March 10, 2015 08:38
Show Gist options
  • Save muratcanbur/6bbf86c2b41eb8ab0ed7 to your computer and use it in GitHub Desktop.
Save muratcanbur/6bbf86c2b41eb8ab0ed7 to your computer and use it in GitHub Desktop.
public void remove(PhotoCard card) {
int position = getItemPosition(card);
if (position != -1) {
mPhotoCards.remove(position);
notifyItemRemoved(position);
}
}
public void add(PhotoCard card, int position) {
mPhotoCards.add(position, card);
notifyItemInserted(position);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment