Android Open Source - AnyadsTodos Task List Controller






From Project

Back to project page AnyadsTodos.

License

The source code is released under:

GNU General Public License

If you think the Android project AnyadsTodos 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.dlacours.anyadstodos;
//ww  w.j  av a2s . co m
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;

import android.content.Context;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;

//Awesome singleton stuff
public class TaskListController {
  /*This class goes between Task and everything else.*/
  
  private static TaskList taskList = null;
  private static TaskList unarchList = null;
  private static TaskList archList = null;
  
  static public TaskList getTaskList() {
    if (taskList == null){
      taskList = new TaskList();
    }
    return taskList;
  }

  static public TaskList getUnarchList() {
    if (unarchList == null){
      unarchList = new TaskList();
    }
    return unarchList;
  }
  
  static public TaskList getArchList() {
    if (archList == null){
      archList = new TaskList();
    }
    return archList;
  }

  
  //I don't think I'm actually using these two methods
  public void addTask(Task task){
    getTaskList().addTask(task);
  }
  
  public void deleteTask(Task task){
    getTaskList().removeTask(task);
  }
}




Java Source Code List

com.dlacours.anyadstodos.ArchiveTaskAdapter.java
com.dlacours.anyadstodos.ArchiveTasksActivity.java
com.dlacours.anyadstodos.EditTaskAdapter.java
com.dlacours.anyadstodos.EditTasksActivity.java
com.dlacours.anyadstodos.MailItemsActivity.java
com.dlacours.anyadstodos.MailItemsAdapter.java
com.dlacours.anyadstodos.MainActivity.java
com.dlacours.anyadstodos.SummariesActivity.java
com.dlacours.anyadstodos.TaskListAdapter.java
com.dlacours.anyadstodos.TaskListController.java
com.dlacours.anyadstodos.TaskList.java
com.dlacours.anyadstodos.Task.java