Created
June 9, 2017 13:55
-
-
Save tmk815/1af19c7ace91b9e6ce7f5fa994a0ed70 to your computer and use it in GitHub Desktop.
SimpleCursorAdapter_Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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