I want to design a basic command pattern that will save integer values and be able to execute a undo method. I'm not sure where to start at all so any help would be much appreciated. Very basic interpretations like below:
package com.k.s;
public class MainActivity extends Activity {
public int Counter = 0;
@Override
protected void onCreate(Bundle savedInsanceState) {
super.onCreate(savedInsanceState);
setContentView(R.layout.activity_main);
Button.setOnClickListener (new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Counter += 1;
}
}
}
}
Aucun commentaire:
Enregistrer un commentaire