Onresume() Update Textview
I have my main depotactivity where he sets integer value to a textview, now I want this value to get updated when onResume() is called... but when I add my little onResume() code p
Solution 1:
I'd start with adding super.onResume();
:
@OverrideprotectedvoidonResume(){
super.onResume();
// The rest
}
I would also remove that:
DepotDBUtilsutils=newDepotDBUtils(this);
intitemcount= utils.countItems(this);
TextViewtv= (TextView)findViewById(R.id.counter);
tv.setText(tv.getText()+" "+itemcount);
from onCreate
, since every time onCreate
is called, onResume
is called as well.
Post a Comment for "Onresume() Update Textview"