Android Open Source - simple-todo Simple Todo Db






From Project

Back to project page simple-todo.

License

The source code is released under:

MIT License

If you think the Android project simple-todo 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.fcduarte.todoapp.database;
/*from  w  w w .j av  a2s  . c om*/
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class SimpleTodoDb extends SQLiteOpenHelper {

  public static final int DATABASE_VERSION = 1;
  public static final String DATABASE_NAME = "SimpleTodo.db";

  public SimpleTodoDb(Context context) {
    super(context, DATABASE_NAME, null, DATABASE_VERSION);
  }

  @Override
  public void onCreate(SQLiteDatabase db) {
    db.execSQL(TodoContract.SQL_CREATE_ENTRIES);
  }

  @Override
  public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    db.execSQL(TodoContract.SQL_DELETE_ENTRIES);
    onCreate(db);
  }

  @Override
  public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    onUpgrade(db, oldVersion, newVersion);
  }

}




Java Source Code List

com.fcduarte.todoapp.activity.EditItemActivity.java
com.fcduarte.todoapp.activity.TodoActivity.java
com.fcduarte.todoapp.database.SimpleTodoDb.java
com.fcduarte.todoapp.database.TodoContract.java
com.fcduarte.todoapp.database.TodoItemDataSource.java
com.fcduarte.todoapp.util.SwipeDismissListViewTouchListener.java