On 6/28/2011 12:03 PM, Diogo Salaberri wrote:
Hi..I have a problem, whe I start my aplication the launcher activity is called HOME, and that HOME automatically call other activity called LOGIN. Now, I have to finish this aplication when I click on default "back button" overwriting onKeyDown. The problem is, how can I do this, a simple finish don't solve this. Follow my code ( onKeyDown ): @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { finish(); return true; } return super.onKeyDown(keyCode, event); } I hope that you can help me. Bye -- Atenciosamente; Diogo Bonoto Salaberri Bacharel em Ciência da Computação - UFPel -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
What are you asking? The default behavior of pushing the back button is to call finish(), so your code above does exactly what the back button already does.
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

