In XML insert onClick commands for each button. In your activity, create a method for each onClick defined, this way:
In XML:
<Button ...
android:onClick="one" />
In the activity you should have a method like this one:
public void one(View v) {
yourEditText.setText(yourEditText.getText().toString() + "1");
}
It should work. You can always use getText()
to get the content and setText(newText)
to set the content. Please note that if you click on the EditText this way you will still get the system keyboard pop up, if you want to only show the value use a TextView instead.
Hope it helps.