Exemple #1
0
 public void incrementCounter(View view) {
   clickCounter++;
   Prefs.setClickCount(this, clickCounter);
   TextView counterTextview = (TextView) findViewById(R.id.click_counter);
   String valueString =
       String.format(getResources().getString(R.string.value_string), clickCounter);
   counterTextview.setText(valueString);
 }
Exemple #2
0
 @Override
 protected void onResume() {
   super.onResume();
   clickCounter = Prefs.getClickCounts(this);
 }