android - Back button goes to the parent activity instead going to the phone home screen -


I have two activities, the basic activity of AYBAB is.

Start with the second one with this code:

  intent to intent = new intent (this, bickle); Beginner (intent); This.finish ();   

and B goes back to this code with a code (like a logout):

  intended intent = new intent (beeth, a class) ); Intent.setFlags (Intent.FLAG_ACTIVITY_CLEAR_TOP); Beginner (intent);   

While giving you more context, the app has a sliding menu and each list item shows a ListFragment within a ListView. The pile has been cleared back on all the scenes and the idea is that when the user presses the back button, he should go to the phone home screen and when the user clicks the app icon from the home screen, the user on which It was necessary to do it again.

The phone that currently runs, the phone is going to the home screen, but when you press the app icon, then this activity starts again from A, which is the launch and main activity.

Any ideas why?

Try adding startActivity () end () < After / code>. This will prevent the process activity from being safely closed.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -