metrick Active Member Licensed User Longtime User May 4, 2012 #1 Is it possible to detect ToastMessage and cancel it before new ToastMessage is fired?
Erel B4X founder Staff member Licensed User Longtime User May 6, 2012 #2 No. 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. Upvote 0
No. 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.
AscySoft Active Member Licensed User Longtime User Aug 26, 2012 #3 Erel said: No. 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. Click to expand... 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! Upvote 0
Erel said: No. 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. Click to expand... 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!
mc73 Well-Known Member Licensed User Longtime User Aug 26, 2012 #4 Perhaps you could try this class. Upvote 0
AscySoft Active Member Licensed User Longtime User Aug 26, 2012 #5 AscySoft said: I kind of need it, although there is now a custom class to do this! Click to expand... mc73 said: Perhaps you could try this class. Click to expand... 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! Upvote 0
AscySoft said: I kind of need it, although there is now a custom class to do this! Click to expand... mc73 said: Perhaps you could try this class. Click to expand... 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!
margret Well-Known Member Licensed User Longtime User Aug 26, 2012 #6 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 Code: Copy '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) Upvote 0
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 Code: Copy '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)
AscySoft Active Member Licensed User Longtime User Aug 26, 2012 #7 margret said: 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. Click to expand... OK, I know that. Thanks anyway for your reply. U are a sweet. I guess I will change to this if b4a ToastMessageShow remains as is today! Upvote 0
margret said: 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. Click to expand... OK, I know that. Thanks anyway for your reply. U are a sweet. I guess I will change to this if b4a ToastMessageShow remains as is today!