Back to project page NotAnotherTodoApp.
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.
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(); } } }