I am a "noob" in Android Development.
I'm developing an app to calculate some results concerning the fitness/wellness. My app have 1 activity that includes 5 fragment:
- a fragment for side bar (contains three imageviews, one for fragment A, one for fragment B and the last one for fragment C)
- Fragment A (Personal Data, like name, sex, birth date, etc)
- Fragment B (Healty, like weight, height, etc)
- Fragment C (Results)
- Fragment D (include a button) <-- always visible
I wish that when I click on the button (fragment D), the app calculates the results to be displayed in the textviews of fragment C, depends on the values entered in the edit text of fragment A and B.
I put the onClick method in the fragment D class (which contain the button) to handle the click. But... when I click on it, how can I "retrieve" the data from the edit text of Fragment 1 and Fragment 2 to calculate the results?
Here there is an image to indicate the behavior of my app: https://i.stack.imgur.com/QEq66.jpg
(I cannot upload directly an image on StackOverflow)
Github project: https://github.com/eldivino87/IoNutrizionista