01.
final
MyDatabase myDb =
new
MyDatabase(
this
);
02.
final
ArrayList<HashMap<String, String>> ScoreList = myDb
03.
.SelectAllData();
04.
05.
ListView list;
06.
list = (ListView) findViewById(R.id.lvScoreall);
07.
08.
SimpleAdapter sAdap;
09.
sAdap =
new
SimpleAdapter(Scoreall.
this
, ScoreList,
10.
R.layout.lsvscoreall,
11.
12.
new
String[] {
"_ID"
,
"Lesson"
,
"Score"
},
new
int
[] {
13.
R.id.col_ID, R.id.ColLesson, R.id.ColScore });
14.
15.
list.setAdapter(sAdap);
16.
registerForContextMenu(list);