I want to increase the textvalue automatic when the activity was reopen
for eq
when we order some food we got a order id which diffrent from pervious id
I want to do this in my project so any one help me
I want to increase the textvalue automatic when the activity was reopen
for eq
when we order some food we got a order id which diffrent from pervious id
I want to do this in my project so any one help me
Store value in SahredPrefrance and access or update when you order like following,
SharedPreferences prefs=getSharedPreferences("order_detail", MODE_PRIVATE);
int old_amount=prefs.getInt("order_amount",0); // initial it return zero
int new_amount=old_amount+currnt_amount;
prefs.edit().putInt("order_amount",new_amount).commit();