public void setList(String search) {
String sql = "select * from facility";
if (!(search==null)) {
sql = "select * from facility where name= '*" + search + "*'";
}
Cursor c = db.rawQuery(sql, null);
if (c.moveToFirst()) {
do {
String f_index = c.getString(0);
int res_img = getResources().getIdentifier(f_index, "drawable",
"com.garatagi_demo");
String f_name = c.getString(1);
String f_info = c.getString(2);
data = new Facility_List(res_img, f_name, f_info);
Array_Data.add(data);
} while (c.moveToNext());
}
ListView list = (ListView) findViewById(R.id.facility_list);
adapter = new Facility_Adapter(this,
android.R.layout.simple_list_item_1, Array_Data);
list.setAdapter(adapter);
}
디비를 asset에 넣고 복사해서 쓰는데 디비안에 table을 못찾네요 ㅠㅠ
시뮬레이터 (지니모션)에서는 잘 작동이 되는데 휴대폰에 어플 설치하니까 자꾸
no such table 에러가 발생해요 ㅠㅠ