don't go to previous screen in android? -


In my application I have two screens, screen 1 and screen 2 if I am in screen 2, when I click on the back button Let me show the screen 1 when I click on the back button in screen 2, the application must be closed. How to do it ???

Perhaps you start screen 1 from screen 1 through an intent.

When you call startActivity (Screen 2), you should turn off screen 1 via the Finnish () call.

Something like this:

  Intention screen 2 = new intent (screen 1. this, screen 2. class); StartActivity (screen2); End();  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -