Android Open Source - commande-godo Todo Emailer






From Project

Back to project page commande-godo.

License

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.

Java Source Code

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]" : "[   ]";
  }
}




Java Source Code List

ca.ualberta.commande.android.commande_godo.MainActivity.java
ca.ualberta.commande.android.commande_godo.NewTodoActivity.java
ca.ualberta.commande.android.commande_godo.SummaryActivity.java
ca.ualberta.commande.android.commande_godo.TodoAdapter.java
ca.ualberta.commande.android.commande_godo.TodoEmailer.java
ca.ualberta.commande.android.commande_godo.data.TodoItem.java
ca.ualberta.commande.android.commande_godo.data.TodoJsonReader.java
ca.ualberta.commande.android.commande_godo.data.TodoJsonWriter.java
ca.ualberta.commande.android.commande_godo.data.TodosDataSource.java