problem with multiple activity's

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

problem with multiple activity's

Postby Kevin.A » Thu Feb 04, 2010 8:31 pm

I have a main activity and from it, several other activity's can be selected with buttons, but sometimes when i'm on a sub activity, and i hit the home screen, it goes to the main, but w/o killing the sub activity
Main->sub->main in order, so if i hit the quit button, on the main screen, i don't exit, but go back to the sub activity

Is there a way in the onCreate to control the activity stack?
Kevin.A
Freshman
Freshman
 
Posts: 7
Joined: Sun Dec 06, 2009 6:58 am

Top

Postby qlimax » Fri Feb 05, 2010 12:42 am

sorry can you better re-explain your problem/situation with some:

(A root activity)
A-B-C-D

"home button"

"back button"

ecc

:lol:

bye
¯`·.¸¸.><((((º>¯`·.¸¸. ><((((º>
User avatar
qlimax
Master Developer
Master Developer
 
Posts: 271
Joined: Mon Aug 31, 2009 10:54 am
Location: Swiss

Postby Kevin.A » Fri Feb 05, 2010 1:21 am

The Program goes A->B, A->C, A->D etc
if your on B,C,D etc.
when you hit home, you come back to that activity.

but if you hit a popup notification (which is generated by a service) you always go back to A, and occational if you hit A->B Home, then click the icon again, your back a A
in both cases your actually A->B->A
so if you click C:
you are now A->B->A->C

which tries to generates a second service, and leads to confusion in the program since the secondary Views(b,c,d,ect) implements Runnable. and can spawn multiple threads instead of one thread per Activity.

so it's really like
A->B->A->B
| |
Thread Thread
Kevin.A
Freshman
Freshman
 
Posts: 7
Joined: Sun Dec 06, 2009 6:58 am

Postby qlimax » Fri Feb 05, 2010 2:02 am

That's a reading I suggest you...
http://developer.android.com/guide/topi ... ml#acttask

I'm sure you can find the correct setting for your situation.
¯`·.¸¸.><((((º>¯`·.¸¸. ><((((º>
User avatar
qlimax
Master Developer
Master Developer
 
Posts: 271
Joined: Mon Aug 31, 2009 10:54 am
Location: Swiss

Postby Kevin.A » Sat Feb 06, 2010 3:47 am

Thanks for the help! I think it's fixed!
Kevin.A
Freshman
Freshman
 
Posts: 7
Joined: Sun Dec 06, 2009 6:58 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests