Monday, July 26, 2010

[android-developers] Re: How to end a child activity and return to parent activity?

And 'finish()' does the same thing as the default behavior of the Back
key.

But why do you want it to do this? Most screens in Android terminate
when the user presses Back, so the user is conditioned to expect this
-- except for progress layouts and the like, where Android already
handles that for you.

Automatic return might not always be a bad idea, but it often is.

On Jul 25, 5:38 am, Corsair <pavel.yat...@gmail.com> wrote:
> An activity has method "finish".
>
> On 25 Лип, 14:21, Mystique <joven.ch...@gmail.com> wrote:> Hi,
>
> > I have a main screen with buttons to launch other subactivities.
> > I have to press back button each time to go back to the main screen of
> > my application.
> > How do I finish a child activity and automatically return from the
> > caller?
>
> > Thanks.
>
>

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment