-
mHelper = new DBHelper(this);
-
-
db = mHelper.getWritableDatabase();
-
cursor = db.rawQuery("select * from prof where name like '%김%'", null);
-
startManagingCursor(cursor);
-
-
-
adapter = new SimpleCursorAdapter(list.getContext(), R.layout.custom,
-
cursor,
new String[] { "name",
"position",
"department",
"number"},
-
new int[] { R.id.name, R.id.position, R.id.department});
-
-
list.setAdapter(adapter);
DB를 customView에 연결하는 부분입니다.
일반 TextView 들은 알아서 자리를 찾아가는데 button에 데이터를 집어넣는 방법을 모르겠습니다.
기존에 있던 listAdapter를 사용해서 연결해보려고 하는데 잘 안되는군요.
별다른 예제도 없는것 같고.. 도움주시면 감사하겠습니다.!
참고로 ListAdapter소스도 올려보겠습니다.