Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
SimpleCursorAdapter_Sample
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
switch (columnIndex) {
case 0:
TextView date = (TextView) view;
date.setText(cursor.getString(1) + "-" + cursor.getString(2) + "-" + cursor.getString(3));
return true;
case 1:
TextView id = (TextView) view;
int time = 1;
int minute = 30;
id.setText(String.format("%d時間%02d分", time, minute));
return true;
default:
break;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment