public void RefreshList() {
cursor1 = QueryData();
if (cursor1 != null) {
startManagingCursor(cursor1);
String[] columns = {"day", "memo"};
int[] reIds = {R.id.textView2, R.id.textView1};
adapter = new SimpleCursorAdapter(getApplicationContext(), R.layout.listitem, cursor1, columns, reIds);
list01.setAdapter(adapter);
text01.setText("");
text01.append("Index : " + count);
}
}
private Cursor QueryData() {
String sql = "select _id, num, day, memo from " + TableName;
cursor1 = database.rawQuery(sql, null);
if(cursor1 != null) {
count = cursor1.getCount();
for(int i = 0; i < count; i++) {
cursor1.moveToNext();
Notimemo = cursor1.getString(2);
}
}
return cursor1;
}
/*이걸 넣으라고 하는데... 넣어도 되질 않습니다. ㅠㅠ
Collections.reverse(list01);
*/
리스트뷰를 역순으로 출력하고 싶습니다.
아직 실력이 부족해서.. 도와주세요 ㅠㅠ