That is easy. You need to put the findViewbyId in OnCreate;
Code
txtNumber = (EditText) findViewById(R.id.txtNumber);