Back to project page assignment1_todolist.
The source code is released under:
GNU General Public License
If you think the Android project assignment1_todolist listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.mswillia_notes002; //from w w w . ja va 2 s .c om import java.io.Serializable; import java.util.ArrayList; public class TodoList implements Serializable{ /* * TodoList class provides methods to set and get full todo lists, and * also provides methods to add and remove todo's from the list and * get the size of the list. */ private static final long serialVersionUID = -2205661156686002749L; private ArrayList<Todo> todoList; //private ArrayList<Todo> todoArchive; public TodoList() { todoList = new ArrayList<Todo>(); //todoArchive = new ArrayList<Todo>(); } public ArrayList<Todo> getTodoList() { return todoList; } public void setTodoList(ArrayList<Todo> todoList) { this.todoList = todoList; } public void addTodo(Todo todo) { todoList.add(todo); //notifyListeners(); } public void removeTodo(Todo todo) { todoList.remove(todo); //notifyListeners(); } public int listSize() { return todoList.size(); } }