rleiman Well-Known Member Licensed User Longtime User Sep 9, 2014 #1 Hi Everyone, Has anyone tried to use the SwitchView and StateManager together? Seems like it may need support for SwitchViews. I placed views such as toggle buttons, seek bars, edit boxes and several switch views. All of the views except the switch views retained their values after exiting the app with Activity.Finish and starting the app up again.
Hi Everyone, Has anyone tried to use the SwitchView and StateManager together? Seems like it may need support for SwitchViews. I placed views such as toggle buttons, seek bars, edit boxes and several switch views. All of the views except the switch views retained their values after exiting the app with Activity.Finish and starting the app up again.
rleiman Well-Known Member Licensed User Longtime User Sep 11, 2014 #21 Erel said: Please create a simple zip file with all the project files and upload it. Click to expand... Hi Erel. Here's the cut down project. Attachments Switch - Cut Down Size.zip Switch - Cut Down Size.zip 500.7 KB · Views: 340 Upvote 0
Erel said: Please create a simple zip file with all the project files and upload it. Click to expand... Hi Erel. Here's the cut down project.
Erel B4X founder Staff member Licensed User Longtime User Sep 11, 2014 #22 The correct code is: Code: Else If GetType(v) = "android.widget.Switch" Then Dim jo As JavaObject = v data = Array(jo.RunMethod("isChecked", Null)) Upvote 0
The correct code is: Code: Else If GetType(v) = "android.widget.Switch" Then Dim jo As JavaObject = v data = Array(jo.RunMethod("isChecked", Null))
rleiman Well-Known Member Licensed User Longtime User Sep 11, 2014 #23 Erel said: The correct code is: Code: Else If GetType(v) = "android.widget.Switch" Then Dim jo As JavaObject = v data = Array(jo.RunMethod("isChecked", Null)) Click to expand... Hi Erel, Perfect! I don't know how the code works but it saved all of the states in the SwitchView views. Thanks so much for your time and help. Upvote 0
Erel said: The correct code is: Code: Else If GetType(v) = "android.widget.Switch" Then Dim jo As JavaObject = v data = Array(jo.RunMethod("isChecked", Null)) Click to expand... Hi Erel, Perfect! I don't know how the code works but it saved all of the states in the SwitchView views. Thanks so much for your time and help.