Android Java onCreate

So I followed Google's first Android app sample. If I taped the send button, it opened up the DisplayMessageActivity. But upon taped the back button (left arrow) from the DisplayMessageActivity, the onCreate(Bundle savedInstanceState) of the MainActivity got called again. It looks like it created a new instance of MainActivity. I could verify this by setting a bool value in onCreate of MainActivity and it was not retained.

How do you go back to the previous instance of MainActivity (the caller)?

评论