Back to project page i_search.
The source code is released under:
GNU General Public License
If you think the Android project i_search 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 com.shapes.shapes; /*from w w w . j av a 2 s . co m*/ import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class OpenHelper extends SQLiteOpenHelper { @SuppressWarnings("unused") private Context context; OpenHelper(final Context context) { super(context, ShapeTable.DATABASE_NAME, null, ShapeTable.DATABASE_VERSION); this.context = context; } @Override public void onOpen(final SQLiteDatabase db) { super.onOpen(db); } // override onCreate to create tables @Override public void onCreate(final SQLiteDatabase db) { ShapeTable.onCreate(db); /*ShapeDAO shapeDao = new ShapeDAO(db); String[] categories = context.getResources().getStringArray(R.array.tmdb_shapes); for(String s : shapes) { shapeDao.save(new Shape(0, s)); } MovieTable.onCreate(db); MovieCategoryTable.onCreate(db);*/ } @Override public void onUpgrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) { ShapeTable.onUpgrade(db, oldVersion, newVersion); } }