Need to calculate the Sum of Values from RecyclerView, and pass to MainActivity
posted 1 month ago
I have a RecylerView, called from my MainActivity.
This RecyclerView holds a list of Titles and Values.
(Detail: They are Attributes of your character in a Game. e.g. Strength 50, Agility 62, Wisdom 43 etc)
The user can change the Values (I am currently using a Spinner, but am open to other methods)
I need to display a total of these Values, and also update the Person Object with them.
From what I can see, I need to set a Listener to notice a Change, and then use an Interface to call a Method in Main Activity, but I cannot find details on this.
Searching fro "interface" produces results about UI.