Sub Activity_Create(FirstTime As Boolean)
test.Initialize("test",2000)
test.Enabled = True
End Sub
Sub test_tick
ToastMessageShow("test",False)
test.Interval = 6000
End Sub
ya this code is working perfectly , thanks for help dude , you are noobs hero
Yes you're right, you don't need to initialise it again. I normally call a sub to stop the timer, set the new interval and then restart the timer to ensure that the first tick event is from time 0 to the interval time eg.
B4X:
..... ' your other code
tmr_Reset(2500) ' reset timer to 2.5s interval
....
Sub tmr_Reset(ms As Int)
tmr.Enabled=False
tmr.Interval=ms
tmr.Enabled=True
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.