示例#1
0
  @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);
  }
示例#2
0
 @Override
 protected void onPause() {
   datasource.close();
   super.onPause();
 }
示例#3
0
 @Override
 protected void onResume() {
   datasource.open();
   super.onResume();
 }