There are tons and tons of examples in the sample code of doing this
kind of thing... what is different about your code? Try removing
parts of the code (for example the onActivityResult(), the
setResult(), use startActivity() instead of startSubActivity()) to
narrow down what aspect is causing the problem.
Also there may be interesting information in the log, so take a look
there for clues.
On Mar 31, 6:45 am, "olivier.k" <[EMAIL PROTECTED]> wrote:
> I have tried to return to the Layout B via emulator's back key (white
> return arrow) and the result is the same.
> The Layout B is vanished !
> This problem really interfere the progression of my application and I
> don't see any other idea to handle this :(.
>
> Kind Regards
>
> Olivier K.
>
> On 31 mar, 10:06, "Dan U." <[EMAIL PROTECTED]> wrote:
>
> > Do you have an onActivityResult in B?
>
> > On Mar 31, 12:32 am, "olivier.k" <[EMAIL PROTECTED]> wrote:
>
> > > 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
-~----------~----~----~----~------~----~------~--~---