Re: [android-developers] Re: Understanding how Activities work

2010-07-28 Thread Kostya Vasilyev
Use startActivityForResult to properly sequence activities. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 28.07.2010 19:33 пользователь "Chris Stewart" написал: It appears to be an issue with my intermediate step of OAuth. When I call finish on the second activity, it doesn't go back to

Re: [android-developers] Re: Understanding how Activities work

2010-07-28 Thread Chris Stewart
It appears to be an issue with my intermediate step of OAuth. When I call finish on the second activity, it doesn't go back to the first because OAuth happened during the second activity. Chris Stewart cstewart...@gmail.com On Wed, Jul 28, 2010 at 10:59 AM, Chris Stewart wrote: > I haven't bee

Re: [android-developers] Re: Understanding how Activities work

2010-07-28 Thread Chris Stewart
I haven't been able to figure this out on my own yet, so here's the code I'm using: To start an activity (happens in onCreate with a specific condition): Intent i = new Intent(StatusActivity.this, AddAccountActivity.class); this.startActivity(i); To close the new activity (happens in a callback m

Re: [android-developers] Re: Understanding how Activities work

2010-07-22 Thread Chris Stewart
I do have one of those circumstances. I'll investigate further and see if I can discovery why calling finish is not doing what I expect (i.e., I'm doing it wrong). Chris Stewart cstewart...@gmail.com On Thu, Jul 22, 2010 at 3:08 PM, Joseph Earl wrote: > As TreKing said - it is perfectly fine a

[android-developers] Re: Understanding how Activities work

2010-07-22 Thread Joseph Earl
As TreKing said - it is perfectly fine and normal for an activity to finish() itself in circumstances where that is required. On Jul 22, 7:56 pm, TreKing wrote: > On Thu, Jul 22, 2010 at 1:35 PM, RichardC > wrote: > > > There is usually no need to call finish(). > > > If you have avoided doing a

Re: [android-developers] Re: Understanding how Activities work

2010-07-22 Thread TreKing
On Thu, Jul 22, 2010 at 1:35 PM, RichardC wrote: > There is usually no need to call finish(). > > If you have avoided doing anything "clever", when the user presses > the [back] button your top activity will finish and the one underneath will > resume. > Well, if your second activity is there to

[android-developers] Re: Understanding how Activities work

2010-07-22 Thread RichardC
There is usually no need to call finish(). If you have avoided doing anything "clever", when the user presses the [back] button your top activity will finish and the one underneath will resume. Put some trace lines ( use Log.d(...) ) in the following methods in both of your activites and see what

[android-developers] Re: Understanding how Activities work

2010-07-22 Thread Joseph Earl
It should work as your describe: If you start activity A and then launch activity B from there, B will be at the top of the Activity stack and A will be 'pushed' further down (to the bottom in this case). When the topmost activity (B in this case) finishes, the next visible activity will simply be