Android Open Source - Todoist-for-Android Projects






From Project

Back to project page Todoist-for-Android.

License

The source code is released under:

GNU General Public License

If you think the Android project Todoist-for-Android 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

/*    
  This file is part of Todoist for Android?.
/* ww  w  . ja v a 2s .co  m*/
    Todoist for Android? is free software: you can redistribute it and/or 
    modify it under the terms of the GNU General Public License as published 
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Todoist for Android? is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Todoist for Android?.  If not, see <http://www.gnu.org/licenses/>.
    
    This file incorporates work covered by the following copyright and  
   permission notice:
   
   Copyright [2010] pskink <pskink@gmail.com>
   Copyright [2010] ys1382 <ys1382@gmail.com>
   Copyright [2010] JonTheNiceGuy <JonTheNiceGuy@gmail.com>

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
*/

package com.android.applications.todoist.containers;

import java.util.ArrayList;


public class Projects {

  // Default Constructor
  public Projects()
  {
    projects = new ArrayList<Project>();
    this.size = 0;
  }
  
  // Return the project in the ArrayList at index
  public Project getProjectsAt(int index)
  {
    if(this.projects.size() > index)
      return this.projects.get(index);
    
    return new Project();
  }
  
  // Add a project to the ArrayList, provided it doesn't exist
  public void addProject(Project newProject)
  {
    if(!this.projects.contains(newProject))
    {
      this.projects.add(newProject);
      this.size++;
    }
  }
  
  public Project getProjectByID(String ID)
  {
    int size = this.projects.size();
    String id;
    
    for(int i=0; i < size; i++)
    {
      id = this.projects.get(i).getID();
      if(id.equals(ID))
      {
        return this.projects.get(i);
      }
    }
    
    return new Project();
  }

  /**
   * @return the projects
   */
  public ArrayList<Project> getProjects() {
    return projects;
  }

  /**
   * @return the size
   */
  public Integer getSize() {
    return size;
  }

  private ArrayList<Project> projects;
  private Integer size;
}




Java Source Code List

com.android.applications.todoist.Constants.java
com.android.applications.todoist.containers.Project.java
com.android.applications.todoist.containers.Projects.java
com.android.applications.todoist.containers.Query.java
com.android.applications.todoist.containers.SeparatedListAdapter.java
com.android.applications.todoist.containers.SeparatedTaskListAdapter.java
com.android.applications.todoist.containers.SupportCase.java
com.android.applications.todoist.containers.TaskListAdapter.java
com.android.applications.todoist.containers.Task.java
com.android.applications.todoist.containers.Tasks.java
com.android.applications.todoist.containers.User.java
com.android.applications.todoist.handlers.DBHelper.java
com.android.applications.todoist.handlers.TodoistAPIHandler.java
com.android.applications.todoist.handlers.WebRequest.java
com.android.applications.todoist.views.LoginPage.java
com.android.applications.todoist.views.SupportForm.java
com.android.applications.todoist.views.TasksList.java
org.xmlrpc.android.Base64Coder.java
org.xmlrpc.android.IXMLRPCSerializer.java
org.xmlrpc.android.MethodCall.java
org.xmlrpc.android.Tag.java
org.xmlrpc.android.XMLRPCClient.java
org.xmlrpc.android.XMLRPCCommon.java
org.xmlrpc.android.XMLRPCException.java
org.xmlrpc.android.XMLRPCFault.java
org.xmlrpc.android.XMLRPCSerializable.java
org.xmlrpc.android.XMLRPCSerializer.java
org.xmlrpc.android.XMLRPCServer.java