Keeping Data on screen after screen orientation changes

walterf25

Expert
Licensed User
Longtime User
Good morning all, i was wondering if i could get some help, i have an app which has 4 different screens, the app supports both portrait and landscape layout, on the second screen i have 5 buttons and when i pressed on one of the buttons it performs a calculation, the results of the calculations are assigned to the button.text property, the problem is that when i change orientation the button.text property goes back to the default text, ie, button1, button2, etc... can anyone help me try to figure this out, i would like for the values from the calculation to stay even after changing screen orientation.

thanks everybody in advance hope everyone is having a great day!

Walter
 

klaus

Expert
Licensed User
Longtime User
You need to define a process global variable for each value you want to memorize, or define an array of variables.
And in the Acticity.Resume routine set the values of these variables to the different view properties you want keep.
Personaly I prefer anyway using global process vaiables for general values and especially for calculations instead of object properties.

Best regards.
 
Upvote 0
Top