我想創建一個學習應用程序.IT包含一個圖像和四個可能的答案,其中之一是真實的...我創建了3個表格 圖像表,包含主要關鍵字 與字標識和簇號我如何使用android中的圖像填充圖像數據庫?
現在我怎麼能填充圖像表從系統圖像和圖像視圖訪問圖像這個詞 簇表的字ID和複雜性的複雜表
public class Database extends SQLiteOpenHelper
{
private static final int DATABASE_VERSION = 2;
private static final String DATABASE_NAME = "kid.db";
public Database(Context context)
{
super(context,DATABASE_NAME,null,DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase)
{
final String SQL_CREATE_IMAGE_TABLE = "create table image(word_ID integer primary key,word text not null,img blob);";
final String SQL_CREATE_COMPLEXITY_TABLE = "create table compexity(WORD_ID integer primary key,complexity integer not null);";
final String SQL_CREATE_CLUSTER_TABLE = "create table cluster(WORD_ID integer primary key,cluster integer not null);";
sqLiteDatabase.execSQL(SQL_CREATE_IMAGE_TABLE);
sqLiteDatabase.execSQL(SQL_CREATE_COMPLEXITY_TABLE);
sqLiteDatabase.execSQL(SQL_CREATE_CLUSTER_TABLE);
}
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion)
{
}
}
[http://www.androidhub4you.com/2012/09/hello-friends-today-i-am-going-to-share.html ](http://www.androidhub4you.com/2012/09/hello-friends-today-i-am-going-to-share.html) – 2015-01-21 06:56:51