Hi all,

I have checked my code and I think that there's nothing wrong :(.

Layout A is calling Layout B with this :


//included in a switch on the onMenuItemSelected method
Intent i = new Intent(this, B.class);
                startSubActivity(i, 0);

In the layout B I'm calling the Layout C with this code :

//included in a setOnClickListener method
Intent i = new Intent(this, C.class);
                startSubActivity(i, 5);


Once in the last Layout C, I'm finishing the subActivity with this
code :

public void onClick(View v) {
        setResult(RESULT_OK, "C", mBdl);
        finish();
}

When I'm hitting the button, the finish() method is closing Layout C
and Layout B. But I don't want to close Layout B !

Someone have an idea ? :)

Kind Regards,

Olivier K.
==========

On 27 mar, 17:23, hackbod <[EMAIL PROTECTED]> wrote:
> The finish() method only stops the activity it is being called in.
> You must be doing something unusual to cause the previous activity to
> stop as well.
>
> On Mar 27, 7:25 am, "olivier.k" <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
> > here is my problem.
>
> > My parent layout is displaying the menu (classic).
> > By hitting a menu choice, I'm displaying another Layout
> > (startSubActivity) wich contains a button. By hitting this button I'm
> > launching a 3rd layout
>
> > (startSubActivity). In this 3rd layout I'm filling a Bundle for the
> > 2nd layout.
>
> > Problem when I'm finishing the 3rd layout with the finish() method the
> > other one subActivity (2nd layout) is ending too.
>
> > How can i close a subActivity/Layout without closing all subActivity ?
>
> > Kind Regards, Olivier K.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to