Activity Resetting After Selecting Image

HimeAnator

Member
Licensed User
Longtime User
I have an activity where the user inputs information into text fields along with an image box that when the user clicks it brings up the gallery and they can select an image and they are returned back to the activity and the image box is then updated with the picture they just selected. However on some devices when the user selects their image and are returned back to the activity all the information they typed in has been reset and the image they selected does not show up either. :sign0163:
 

HimeAnator

Member
Licensed User
Longtime User
Right now I have no code in Activity_Pause

So would I add
B4X:
Sub Activity_Pause (UserClosed As Boolean)
StateManager.SaveSettings
End Sub
and

Resume the activity with
B4X:
StateManager.RestoreState(Activity, "Main", 0)

and this will keep the activity from resetting? Thank you for your help.
 
Upvote 0
Top