Q:

How to change a TextView using Button

I am sorry if the question seems very obvious, but I'm a beginner and i want to figure out how Android works.
What I am trying to do is editing a small virtual pad with two buttons (1 & 2). 
Is it possible to change a TextView that is supposed to display what the user has typed by using setOnClickButton() inside the onCreate() method?
I am asking that because I've read in an other stackoverflow subject that the onCreate() method creates the activity once and for all and that it isn't possible to update it multiple times by introducing code inside the onCreate() method.
Here is my code:
public class MainActivity extends Activity {
Button button1;
Button button2;

public void arrayToString(ArrayList<String> toto, String tota){
    for (String s : toto)
    {
        tota += s + " ";
    }
}

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_main);

    final ArrayList<String> displayList = new ArrayList<String>();
    final String displayString = "";

    final TextView displayTextView = (TextView)findViewById(R.id.screen1);

    Button button1 = (Button)findViewById(R.id.one);
    Button button2 = (Button)findViewById(R.id.two);

    button1.setOnClickListener( new OnClickListener(){
        public void onClick(View v){
            displayList.add("1");
            arrayToString(displayList,displayString);
            displayTextView.setText(displayString);
        }    
    });

    button2.setOnClickListener( new OnClickListener(){
        public void onClick(View v){
            displayList.add("2");
            arrayToString(displayList,displayString);
            displayTextView.setText(displayString);
        }    
    });  
}
}

Thanks again,

A:

As the name suggests, the OnClickListener "LISTENS" for clicks. So every time the button is clicked, the code inside the onClick() will be executed. So, that displayTextView.setText(displayString) will be run every time you press the button

