You're doing all the average calculation too early in the activity lifecycle.
As your code currently stands, when the activity is created your getting the text in the EditTexts and calculating the average, even before the user has had a chance to enter anything into the EditTexts.
You need to move the code from gtext = editText1.getText().toString(); to str = "Ditt snitt