Android Open Source - NotAnotherTodoApp Todo






From Project

Back to project page NotAnotherTodoApp.

License

The source code is released under:

GNU General Public License

If you think the Android project NotAnotherTodoApp 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 ca.ualberta.cs.notanothertodoapp;
//  w  w w. ja  v a2 s. co m
public class Todo {
  /*Todo Object*/
  
  //Todo string
  protected String todoItem;
  //Todo check true = Done, false = Still Todo
  protected boolean check;
  
  //Constructor
  public Todo(String todoItem) {
    this.todoItem = todoItem;
    check = false;
  }

  //Get the String for the Todo
  public String getItem() {
    return todoItem;
  }
  
  //Get bool Check
  public boolean getCheck() {
    return check;
  }
  
  //Toggle the check
  public void toggleCheck() {
    if (check) {
      setTodo();
    } else {
      setDone();
    }
  }
  
  //Set Check to false
  public void setTodo() {
    check = false;
  }
  
  //Set Check to True
  public void setDone() {
    check = true;
  }
  
  //Get the string
  public String toString() {
    return getItem();
  }

  //Get the string representation including the check
  public String toStringRep() {
    String string;
    if (check) {
      return "[X] " + getItem();
    } else {
      return "[ ] " + getItem();
    }
  }
  
  
}




Java Source Code List

ca.ualberta.cs.notanothertodoapp.AllTodosActivity.java
ca.ualberta.cs.notanothertodoapp.ArchiveActivity.java
ca.ualberta.cs.notanothertodoapp.Listener.java
ca.ualberta.cs.notanothertodoapp.MainActivity.java
ca.ualberta.cs.notanothertodoapp.TodoListAdapter.java
ca.ualberta.cs.notanothertodoapp.TodoListController.java
ca.ualberta.cs.notanothertodoapp.TodoList.java
ca.ualberta.cs.notanothertodoapp.Todo.java