Back to project page commande-godo.
The source code is released under:
MIT License
If you think the Android project commande-godo 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.commande.android.commande_godo; //from ww w.j av a 2 s.c om import java.util.List; import ca.ualberta.commande.android.commande_godo.data.TodoItem; public class TodoEmailer { public static String generateBody(List<TodoItem> todos) { String emailBody = ""; for (TodoItem todo : todos) { emailBody = emailBody + getCheckbox(todo) + " " + todo.getTitle() + "\n"; } return emailBody; } public static String generateSubject(List<TodoItem> todos) { return "Here are some todos!"; } private static String getCheckbox(TodoItem todo) { return (todo.isCompleted()) ? "[X]" : "[ ]"; } }