Exercise: Intents, data back and forth

In this exercise you must send simple data in an Intent object - and return simple data.

I want you to program two Activities: Activity1 and Activity2. The two activities can share a single layout file (main.xml), if you want.

  1. In Activity1 you type some text and then press the button "Activity 2" to switch to Activity2.
  2. In Activity2 it shows the text you typed in Activity1 (the data was sent in the Intent), and you type another text and press the button "Back to Activity 1".
  3. In Activity 1 it now shows the text you typed in Activity 2 (the data was returned with the Intent).