Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Save data on task create and delete

Signed-off-by: simonewebdesign <hello@simonewebdesign.it>
  • Loading branch information...
commit ed0311035b562ec748fbefc4ba58d2879131d88a 1 parent ab922f8
@simonewebdesign authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/com/example/todolist/MainActivity.java
View
2  src/com/example/todolist/MainActivity.java
@@ -80,6 +80,7 @@ public void onClick(View v) {
int index = 0;
todoRows.add(index, new ToDoRow(task));
adapter.notifyDataSetChanged();
+ saveData();
myEditText.setText("");
}
}
@@ -240,6 +241,7 @@ public void onDialogDeleteClick(DialogFragment dialog) {
ToDoRow row = ((ItemViewDialogFragment) dialog).getEntity();
todoRows.remove(row);
adapter.notifyDataSetChanged();
+ saveData();
Util.showToast(context, "Task deleted successfully");
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.