How to close screen while moving to next screen in android platform?
-
05-07-2019 - |
Question
How to close screen while moving to next screen in android platform?
i have one working scenario like this. while moving from one screen to other screen need to close(i shouldn't show screen while press Esc key).
Please help me
Regards, Jeyavel N
Solution
I'm assuming that by "screen" you mean "Activity".
All you need to do is call finish() after you call startActivity(). eg.:
startActivity( new Intent( this, Foo.class) );
finish();
That should do it.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow