tags:

views:

16

answers:

1

I am working on an app that has multiple tabs. In the first tab the user will enter values. In the other tabs it will display the results of calculations based off of those values.

Like in tab 1, the user will enter "3" and "2". In tab 2, the program will add them and display "5".

In tab 2 how do I access the ints "3" and "2"?

Thanks

+1  A: 

The TabHost widget lets you design its tabs with or without individual activities. It does not look like there is a need to have separate activities when you switch tabs in your scenario. Why not use a single activity?

Example

cdonner
It would be possible to do it in a single activity. I probably will in the final app, but right now I'm just experimenting with programming in Android.Thanks for the help!
Matt
Then look into how to use a Bundle to pass parameters to activities, and how to use the onActivityResult to retrieve results. Remember that starting an activity is asynchonous, i.e. the starting activity does not wait for a result.
cdonner