I have application with several activities with common View
s (a few Buttons
and a TextView
). I've created the common View
and handled the actions in abstract class that extends Activity
and all my activities extends my abstract class.
My problem was when I switched between activities and changed a text on a Button
. For example, when I pressed "back" button the previous Activity
didn't have the "updated" text on the Button
. I added in my abstract class onActivityResult()
method and changed in all activities to open new activity from startActivity to startActivityForResult. Now it's working fine but I found out that there's also onResume()
method that can handle my first problem.
So my question is: what is better? or even more accurate: what is the right way to handle my problem? thanks