I think you don't need to call startActivity from your MainActivity to go to the Login Activity. Because the Activity chain, would be enough calling finish from your MainActivity.
I think it's better the way Marco is doing it. Of course, hi will have to finish the Login activity before starting the Main one. Otherwise, the user could press the Back key in the main activity and find out that he is logged out, which is not good.
– Cristian Dec 4 '10 at 12:51.
Oooooops, my bad. The inflate menu code was accidentally copied and pasted to Login Activity when I was coping another piece of code :) Sorry about this Thanks anyway for the support!
I think I understood the Activity lifecycle on Android, but I still can't figure why the followin is happening. In Login activity, I connect to a service to validate the login. There is no Options menu in Login activity.
So far so good. But I want the user to be able to log out and go back to login screen. If I press that menu button, the application displays Login activity again.
But if I press the MENU key, the application displays the menu from Main activity even if it's not visible. Furthermore, if I go back to home screen (pressing HOME) and come back to my activity after a while, the application displays the Login activity, but if I press the MENU key the Main application menu still shows. How do I remove the menu from the Login activity?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.