I have four EditText in my Layout.I have updated the value in four EditText.When I rotate Screen,the data of all four EditText has reset.Please check attached layout File and advise the same...
I have tried StateManager also but I have not solved this problem....
B4X:
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed Then
StateManager.ResetState("Main")
Else
StateManager.SaveState(Activity, "Main")
End If
StateManager.SaveSettings
End Sub
1. See the warnings. You cannot show Msgbox from Activity_Pause.
2. Don't use Msgbox at all. Use Log instead. See the debugging tutorial.
3. Your layout is wrong. There should never be two views anchored to BOTH on the same horizontal or vertical line. See the visual designer tutorial: https://www.b4x.com/etp.html
4. You are not using StateManager correctly. See the tutorial: https://www.b4x.com/android/forum/t...applications-settings-and-state.9777/#content
You should restore the state in Activity_Create.
5. Please use File - Export as zip when you upload projects to the forum.
As per your request, I have restore "State" in "Activity_Create" Event.....
It works fine as per my requirement, but why "Runtime view not saved" ??? ,
Actually I have used "GallaryView" in runtime but When I restore "State" ,the Gallaryview not updated.....