Clear all values, spinners, etc. back to original state

DCooper

Member
Licensed User
Longtime User
Ok, So on my app I have several spinners, labels, etc. I would like to add a clear button. What is the easiest way to do this? Is there a way to simply reset the activity?

Thanks!
 

timwil

Active Member
Licensed User
Longtime User
I usually create a sub named Init - the first time thru I call it to initialize all the variables - if I need to reset the vars I just call this procedure again
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
You're going to need a Reset Sub for that, something like:
B4X:
Sub ResetAll

    Spinner1.Clear
    ListView1.Clear
    ...
    ...
    For I = 0 to 10

        Spinner1.Add(I)

    Next

   '<etc etc for each view, load default values>
 
Upvote 0

DCooper

Member
Licensed User
Longtime User

This seems to work, but the spinner still displays the last value(say 3) and not zero. This does clear the value from the calculation though.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…