Ricky D Well-Known Member Licensed User Longtime User Mar 3, 2018 #1 I'd love to know how I code the StateManager to be able to save what date was selected (the bit that looks like an edittext) and also save the ticks value of the date regards, Ricky
I'd love to know how I code the StateManager to be able to save what date was selected (the bit that looks like an edittext) and also save the ticks value of the date regards, Ricky
Eme Fibonacci Well-Known Member Licensed User Longtime User Mar 3, 2018 #2 1) You can create a method in the AnotherDatePicker class like this: Code: Copy Public Sub getTimeStamp As String Return dateField.Text End Sub And then you can get the string using: Code: Copy Sub AnotherDatePicker1_DateChanged (NewDate As Long) Log ($ "New date $ Date {NewDate}" $) Log (AnotherDatePicker1.TimeStamp) End Sub 2) (I guess) StateManager saves views values. AnotherDatePicker is a class. It is not a View. However, you could save and retrieve the value using a invisible label in your activity. Last edited: Mar 3, 2018 Upvote 0
1) You can create a method in the AnotherDatePicker class like this: Code: Copy Public Sub getTimeStamp As String Return dateField.Text End Sub And then you can get the string using: Code: Copy Sub AnotherDatePicker1_DateChanged (NewDate As Long) Log ($ "New date $ Date {NewDate}" $) Log (AnotherDatePicker1.TimeStamp) End Sub 2) (I guess) StateManager saves views values. AnotherDatePicker is a class. It is not a View. However, you could save and retrieve the value using a invisible label in your activity.
Ricky D Well-Known Member Licensed User Longtime User Mar 3, 2018 #3 all I want is to be able to save those 2 things and get them back if the phone is rotated Upvote 0
Ricky D Well-Known Member Licensed User Longtime User Mar 3, 2018 #4 Testing I found the statemanager works. I'm using v2 of the anotherdatepicker where you place it on the designer so it's a view in the activity. Yesterday it was crashing but now works. The real test is when I give the app to 3 testers to test it out Last edited: Mar 3, 2018 Upvote 0
Testing I found the statemanager works. I'm using v2 of the anotherdatepicker where you place it on the designer so it's a view in the activity. Yesterday it was crashing but now works. The real test is when I give the app to 3 testers to test it out