The question is quite simple. But I want to know where exactly do we make our references to the gui elements? As in which is the best place to define:
final
String fname = ((EditText)findViewById(R.id.txtFirstName)).getText().toString(); String lname = ((EditText)findViewById(R.id.txtLastName)).getText().toString(); ((EditText)findViewById(R.id.txtFullName)).setText(fname + " "+lname);