上一篇我们已经了解了SQLiteOpenHelper 和 构造函数. 现在我们就来掌握一下:onCreate( ) onUpgrade( ) onDowngrade( ) public void onCreate( SQLiteDatabase db) api:Called when the database is created for the first time. 首次创建数据库时调用,即没有数据库前身,可用于数据初始化. 参数 db --->指这个数据库 public void o…
SQLiteOpenHelper api解释: A helper class to manage database creation and version management. You create a subclass implementing onCreate(android.database.sqlite.SQLiteDatabase), onUpgrade(android.database.sqlite.SQLiteDatabase, int, int) and optionally…