开发者

How to close screen while moving to next screen in android platform?

开发者 https://www.devze.com 2022-12-12 19:12 出处:网络
How to close screen while moving to next screen in an开发者_开发百科droid platform? i have one working scenario like this. while moving from one screen to other screen need to close(i shouldn\'t show

How to close screen while moving to next screen in an开发者_开发百科droid 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消