Android Open Source - assignment1_todolist Todo List






From Project

Back to project page assignment1_todolist.

License

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.

Java Source Code

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();
  }
  
  
}




Java Source Code List

com.example.mswillia_notes002.CombinedList.java
com.example.mswillia_notes002.InterfaceFileManager.java
com.example.mswillia_notes002.ListViewAdapter.java
com.example.mswillia_notes002.MainActivity.java
com.example.mswillia_notes002.SummaryActivity.java
com.example.mswillia_notes002.TodoListFileManager.java
com.example.mswillia_notes002.TodoList.java
com.example.mswillia_notes002.Todo.java