摘要: 使用之前的SQLite存储的应用程序。首先需要在这个应用程序中创建内容提供器,右击com.example.administrator.exp7包→New→Other→Content Provider,会弹出这样的对话框, 其中Class name 是内容提供器的名字,Authorities是包名co 阅读全文
posted @ 2017-08-26 18:13 xxbbtt 阅读(1359) 评论(1) 推荐(0)
摘要: 目前数据库中有一个Book表,如果想要添加一个Category表,就需要对数据库进行升级,这时需要用到MyDatabaseHelper中的onUpgrade()方法。 首先和Book表的建立一样需要先写好建表语句: create table Category ( id integer primary 阅读全文
posted @ 2017-08-26 17:38 xxbbtt 阅读(434) 评论(0) 推荐(0)