@Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.highscore); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); datasource = new ScoreManager(this); // datasource.open(); // datasource.addScore(new Score("98")); List<String> values = datasource.getAllScores(); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, values); setListAdapter(adapter); }
@Override protected void onPause() { datasource.close(); super.onPause(); }
@Override protected void onResume() { datasource.open(); super.onResume(); }