should I use Activity moveTaskToBack when switching to another activity
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 ca开发者_Go百科se?
10x :)
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.
精彩评论