The prefix m as in mEditText means that this is a member variable not locally scoped. It's best practice to store your views as member variables of the class.