How add searchView in a blob image gridView in android???

  • Thread starter Thread starter Android Central Question
  • Start date Start date
A

Android Central Question

THESE ARE MY SQLite codes:
public void insertData(String name, String des, String price, byte[] image){
SQLiteDatabase database = getWritableDatabase();
String sql = " INSERT INTO MUSIC VALUES ( NULL, ?, ?, ?, ? ) ";

SQLiteStatement statement = database.compileStatement(sql);
statement.clearBindings();

statement.bindString(1, name);
statement.bindString(2, des);
statement.bindString(3, price);
statement.bindBlob(4, image);

statement.executeInsert();

}

THESE ARE MY READ CODES:

final Cursor cursor = MainActivity.sQliteOpenHelper.readDAta(" SELECT * FROM MUSIC ");
list.clear();
while (cursor.moveToNext()){
int id = cursor.getInt(0);
String name = cursor.getString(1);
String des = cursor.getString(2);
String price = cursor.getString(3);
byte[] image = cursor.getBlob(4);

list.add(new Music(id , name , des, price, image));
}
adapter.notifyDataSetChanged();

please help me
 
Would you like this to be moved to our Developers forums, or anywhere else? It's rather technical for the Ask A Question forum.
 

Trending Posts

Members online

Forum statistics

Threads
954,116
Messages
6,960,630
Members
3,162,924
Latest member
und3ad