What is the recomendded pratice when i switch to another activity?
Lets say I have:
Intent switch = new Intent(first.this, second.class);
startActivity(switch);
Should I use Activity moveTaskToBack in this case?
10x 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is the correct way to start a new activity and transition from one screen to another.
The new activity will be pushed onto the stack and shown on the screen.
The user can use the back button to return to the previous screen.
There’s no need to write additional logic, or use the moveTaskToBack method.
This is the standard Android behavior and this is what people expect when working with Android apps. No additional coding required to do simple activity transitions.