In B4A-Bridge I've created a ShowToastMessage sub that saved the time of the last shown message. If a message was shown in the last 5 seconds then the new one is ignored. I used it to avoid the case where many messages where displayed one after another for a long time.
If a message was shown in the last 5 seconds then the new one is ignored. I used it to avoid the case where many messages where displayed one after another for a long time.
Is it possible to close current message(if exists), or current messages queue and instantly display only the new one?
I kind of need it, although there is now a custom class to do this!
I know that, but i wanna know if ToastMessageShow could be "upgraded" to "clear previous messages" or something
In worst case I will use another class, because I try to make everything simple!
Thanks anyway!
My class does just what you are looking for and it is simple to use. It takes two lines of code to set it up and just one to call it. You must use the one labeled: CToast_9PatchSound.zip
B4X:
'Add these two lines to Globals
Dim MyT As CToast
MyT.Initialize(Activity, Me, Activity.Height, Activity.Width)
'Call ToastMessage with this code
MyT.ToastShow("This is the new toast...", 3)
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.