how to jump to more than one activity?

0 KAIYAO YANG · May 22, 2015
like main to the register then log in then back to main?

Post a Reply

Replies

Oldest  Newest  Rating
0 Dol Lod · May 22, 2015
It can be done through a bit of direction. I'm not entirely sure what you're asking, but intents can always switch you from one activity to another. My interpretation is you want some code to take place in some other activity and then come back to where you are. 

You could probably do something like putExtra  as a condition to do work in the second activity and then use another intent to jump back.

What I am describing:

Start: In  Activity A
Step 1: Put extra string in intent for desired activity using it as a signal for special code. Then go to that activity.
Step 2: Try to receive that string if it is available. If it is available, branch off and do the custom work you want in the activity.
Step 3: Then use an intent to go back to activity A.

I hope this is what you were looking for. 
0 Troy Jones · May 23, 2015
Why would you want to do that? Use main as your welcome activity and then navigate from there.
  • 1

Java / Android Development

107,246 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator