Hi masters... Why does state manager dont save sa text of button also does the state manager support sa items in listview? (save sa state of listview with items loaded)
Here is my code
Tnx...
Here is my code
B4X:
Sub Globals
Dim Button1 As Button, Label1 As Label, EditText1 As EditText, ListView1 As ListView
Dim TestInt As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
Activity.AddMenuItem("Test Value", "mnuTest")
If StateManager.RestoreState(Activity, "Main", 0) = False Then
End If
Dim AutoUpdate As Boolean
AutoUpdate = StateManager.GetSetting2("AutoUpdate", False)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed Then
StateManager.ResetState("Main")
Else
StateManager.SaveState(Activity, "Main")
End If
StateManager.SaveSettings
End Sub
Sub mnuTest_Click
Msgbox(TestInt, "")
End Sub
Sub Button1_Click
Button1.Text = Rnd(1, 101)
TestInt = EditText1.Text
For x = 1 To TestInt
ListView1.AddSingleLine(x)
Next
StateManager.SaveState(Activity, "Main")
StateManager.SaveSettings
End Sub
Tnx...