Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void deleteCurrentTodoItem(final int position) {
- mRealm.executeTransaction(new Realm.Transaction() {
- @Override
- public void execute(Realm realm) {
- //needed appropriate action for db manipulation
- //I've used realmDb so, use next line if your using realmDb
- //and need to deleteItem from db
- //otherwise write your code to implement required functionality
- mRealmTodoList.deleteFromRealm(position);
- notifyDataSetChanged();
- notifyItemRemoved(position);
- //notifyItemChanged(position);
- notifyItemRangeChanged(position, mRealmTodoList.size());
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement