Android Question Maintaining user entered data on activity

abhishek007p

Active Member
Licensed User
Longtime User
i have a calculator like single activity app, user fills some the data and it calculate, app works fine.
but when we switch to some other app and back to my app, all data like are reset/erased from the textbox, colors of controls are reset etc. like the activity is recreated.

how do i maintain the user entered data, along with control properties.
should i internally save the data in global variable and reload them in Activity_Resume.

what are best practices for this issue.

regards,
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…