'How do I keep child activity's changes untouched when pressing back button?

Let's say I have two activities, A and B. A is the parent of B. When I change something on A and I go to B and back to A I can still see the changes. But, when I change something in B, go back to A and back again to B it's been reset as if it's the first time I'm opening it. How can I keep the changes and not lose data on activity B? Thanks in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source