Possible Duplicate:
android pressing back button should exit the app
I'm building a register and login screen just for an exercise. So I put SharedPreferences so that when user open the app again, it will direct them to login activity and not start again from register. However, when I press back button from login activity it still take me back to register activity which could change the already saved SharedPreferences. I wanna disable this function, how to simply exit the app when user press the back button?
Thanks,