This should fix all issues that you were having. 

 Fixed by removing SpinnerActivity class from inside of MainActivity, added a submitButton variable to the MainActivity for transitioning, rather than using block scoped variables, defined members variables for EditText, Spinner, and Button also.

Also, rather than dynamically creating the TextView, just added a TextView widget to the Display Message Activity XML,
then setting the text as appropriate. Also used a member variable for TextView in the DisplayMessageActivity class.