[android-developers] Re: Finish all previous Activities?

2012-10-16 Thread ToTo
Did it worked? not for me :(

On Tuesday, June 2, 2009 1:20:43 AM UTC+5:30, guruk wrote:
>
> !!! thanks !!! 
>
> looks great 
>
> chris

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Finish all previous Activities?

2009-06-01 Thread guruk

!!! thanks !!!

looks great

chris
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Finish all previous Activities?

2009-06-01 Thread Marco Nelissen
On Mon, Jun 1, 2009 at 11:59 AM, guruk  wrote:

>
> Hi Marco, that sounds interesting.
>
> how to set the clear top flag?
> right i call the main acticity again with:
>
>Intent mainIntent = new Intent(listdatabases.this,
> datepicker.class);


add: mainIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

   mainIntent.putExtra("db_table", databasestr
> );
>
>  listdatabases.this.startActivity(mainIntent);
>listdatabases.this.finish()
>
> And you mean its like .
>
> "a" (datepicker.class) starts "b", "b" starts "c", "c" starts a with
> "clear top"
> and when I press "back" it will just exit to the homescreen, right?
> that would be great!
>

If "a" was launched from the home screen, then yes.
See the description at
http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Finish all previous Activities?

2009-06-01 Thread guruk

Hi Marco, that sounds interesting.

how to set the clear top flag?
right i call the main acticity again with:

Intent mainIntent = new Intent(listdatabases.this, datepicker.class);
mainIntent.putExtra("db_table", databasestr );
listdatabases.this.startActivity(mainIntent);
listdatabases.this.finish()

And you mean its like .

"a" (datepicker.class) starts "b", "b" starts "c", "c" starts a with
"clear top"
and when I press "back" it will just exit to the homescreen, right?
that would be great!

chris
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Finish all previous Activities?

2009-06-01 Thread Marco Nelissen
You could launch the main activity again with the 'clear top' flag, which
has the effect of clearing all activities on top of it.



On Sat, May 30, 2009 at 11:31 AM, guruk  wrote:

>
> Hi,
>
> is it possible with one call to finish all previous Activities.
> (like: this.finish(all) :)
>
> I have a main activity, calling a preferences and there is a
> switchuser point that switch the user
> and call the main activity again. But than i dont need that the user
> can go back, step by step,
> It would be just fine i could say "kill all previous activites" in the
> moment the user klick "switch user"
>
>
> any idea?
>
> greets
> chris
>
> >
>

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Finish all previous Activities?

2009-06-01 Thread guruk

Thanks, i already thought about.. will see.. needs quit a lot of
rework :)
--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Finish all previous Activities?

2009-06-01 Thread Ben Roberts

On May 30, 2:31 pm, guruk  wrote:
> I have a main activity, calling a preferences and there is a
> switchuser point that switch the user
> and call the main activity again. But than i dont need that the user
> can go back, step by step,
> It would be just fine i could say "kill all previous activites" in the
> moment the user klick "switch user"

As a shot in the dark, would it be easier to use startActivityForResult
() when calling your preferences activity, then when the prefs
finishes it returns a result indicating the user changed, so in your
main activity's onActivityResult() you then reinitialize?

The Android NotePad tutorial works in a similar fashion when adding a
new note.

Ben

--~--~-~--~~~---~--~~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---