I’m developing an Android 2.2 application.
I want to know which activity method is ran when user press back key.
I have found this:
“When the user presses the BACK key, the current activity is popped from the stack, and the previous one resumes as the running activity. “
But it doesn’t tell what method is ran.
Thanks.
In Android 2.2, pressing the BACK button triggers
onBackPressed()in your activity. The default implementation ofonBackPressed()callsfinish().