The StateManager.zip sample restores an Edittext which is on a Panel when the screen is rotated, but when I use StateManager.bas with StdViewPager I'm not finding how to restore the Edittext in my project.
I've tried passing StateManager the Panel instead of the activity as the first parameter. (as listed below)
Is there a way to get around the initialization after a screen rotation which resets 'CurrentPage' to zero, or what other way is there to get this to work?
Thanks in advance
I've tried passing StateManager the Panel instead of the activity as the first parameter. (as listed below)
B4X:
Sub Activity_Create(FirstTime As Boolean)
...
StateManager.RestoreState(Activity, "Main)", 60)
StateManager.RestoreState(Activity, "Panels(svpTest.CurrentPage)", 60)
StateManager.RestoreState(Activity, "svpTest.Panels(svpTest.CurrentPage)", 60)
End Sub
Sub Activity_Pause (UserClosed As Boolean)
StateManager.SaveState(Activity, "Main")
StateManager.SaveState(Activity, "Panels(svpTest.CurrentPage")
StateManager.SaveState(Activity, "svpTest.Panels(svpTest.CurrentPage")
End Sub
Thanks in advance