Reputation: 119
I need to update 2 textViews everytime someones opens the activity they are on. The problem is that if you tap the back button to go to that activity the onCreate method won't activate and the data won't update.
Upvotes: 0
Views: 54
Reputation: 168
If you enter another app, your activity is paused. Remember that OnCreate is only called when your activity is started. You need to run your code also in OnResume:
@Override
public void onResume(){
super.onResume();
// Your code to activate TextView
}
Upvotes: 1