Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - starting Activities from outside

starting Activities from outside

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

starting Activities from outside

Postby metter » Wed Jul 08, 2009 10:03 am

Hello there

I am wondering about the way to go about starting activities.

Let's assume I have Activity A, Activity B and Activity C.

Activity B is shown. When some stuff is done, I want to show Activity C. So far no problem. BUT when the user hits back from Activity C, A should be shown, not B.
Until now I have used some hack ala "ActivityA.startActivityC" which I called from activity B. But somehow i don't believe this is the best way to go here?

A start B
B start C
C back A


Thanks! :)

Cheers
metter
Junior Developer
Junior Developer
 
Posts: 16
Joined: Tue Jan 06, 2009 2:00 pm

Top

Postby serkan.dogantekin » Thu Jul 09, 2009 7:20 am

I think you can use startActivityForResult method when starting C from B, like:

in A:
startActivity(new Intent(this,B.class));

in B:
startActivityForResult(new Intent(this,C.class),START_C);

onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == START_C) {
finish();
}
}

in this manner when Activity_C "finishes", the "onActivityResult" will be called in Activity_B with the code specified in the"startActivityForResult" call. And if you call "finish" at that condition, we will be return to the Activity_A
serkan.dogantekin
Developer
Developer
 
Posts: 27
Joined: Thu Jun 04, 2009 6:12 pm
Location: Istanbul/Turkey

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests