Aug 31, 2011 Replies: 34 Hey, I was just a bit bored and decided to make a small library for fun. It's nothing special. With this library, you are able to position your toastmessage and choose the duration. The duration is approximately and not correct. Code: Dim ct1 As CustomToast ct1.Initialize ct1.Show("This is a custom toast message.",10000,Gravity.TOP,0,0) It also works when the activity is closed. Cheers, Tomas Attachments Customtoast.zip Customtoast.zip 3.7 KB · Views: 2,996 Last edited: Sep 1, 2011 Click to expand...
Hey, I was just a bit bored and decided to make a small library for fun. It's nothing special. With this library, you are able to position your toastmessage and choose the duration. The duration is approximately and not correct. Code: Dim ct1 As CustomToast ct1.Initialize ct1.Show("This is a custom toast message.",10000,Gravity.TOP,0,0) It also works when the activity is closed. Cheers, Tomas
bsnqt Active Member Licensed User Longtime User Jan 5, 2013 #21 pluton said: I think that toastmessage doesn't have "OK" button or any button. Did you mix it with MsgBox ??? Click to expand... I got this application in Google Play and installed it to see how it works. It seems to me that their toast message does really have an OK button. Or at least it is a custom message dialog that can behave very similarly to a real toast message, which can display out of its "parent" application and on top of all other applications as well... The application name is "caller's last sms" https://play.google.com/store/apps/...xLDEsImNvbS5yYWplc2guY2FsbGVyLmxhc3RzbXMiXQ.. Attachments unnamed[5].jpg 17.7 KB · Views: 623 Last edited: Jan 5, 2013
pluton said: I think that toastmessage doesn't have "OK" button or any button. Did you mix it with MsgBox ??? Click to expand... I got this application in Google Play and installed it to see how it works. It seems to me that their toast message does really have an OK button. Or at least it is a custom message dialog that can behave very similarly to a real toast message, which can display out of its "parent" application and on top of all other applications as well... The application name is "caller's last sms" https://play.google.com/store/apps/...xLDEsImNvbS5yYWplc2guY2FsbGVyLmxhc3RzbXMiXQ..
bsnqt Active Member Licensed User Longtime User Jan 7, 2013 #22 XverhelstX said: Thanks guys! Customtoast library has been updated. Now you are able to add an image to the toast message shown on the post above. However it's not possible to add the Attention(see the right image) as you'd need your own custom xml files. This will make a toast message covering the whole screen for approx. 10 seconds, showing a logo at the top and text beneath it. XverhelstX Click to expand... Hi XverhelstX Can we have a click event for your toast message? (as it has no button, I want the user at least to have something to interact with it) Thanks Best
XverhelstX said: Thanks guys! Customtoast library has been updated. Now you are able to add an image to the toast message shown on the post above. However it's not possible to add the Attention(see the right image) as you'd need your own custom xml files. This will make a toast message covering the whole screen for approx. 10 seconds, showing a logo at the top and text beneath it. XverhelstX Click to expand... Hi XverhelstX Can we have a click event for your toast message? (as it has no button, I want the user at least to have something to interact with it) Thanks Best
XverhelstX Well-Known Member Licensed User Longtime User Jan 7, 2013 #23 As far as i know, it is impossible to add a button to a toastmessage. You should create your own custom toast message. I think there a class available for that. Regards, Tomas Verstuurd van mijn R800i met Tapatalk
As far as i know, it is impossible to add a button to a toastmessage. You should create your own custom toast message. I think there a class available for that. Regards, Tomas Verstuurd van mijn R800i met Tapatalk
bsnqt Active Member Licensed User Longtime User Jan 9, 2013 #24 XverhelstX said: As far as i know, it is impossible to add a button to a toastmessage. You should create your own custom toast message. I think there a class available for that. Regards, Tomas Verstuurd van mijn R800i met Tapatalk Click to expand... No, I don't mean to add a button to the toast and we have click event for that button. What I meant is a click event on the toast itself, when we click directly on the toast message, for example. I want the user can have possibility to close the toast, for example, or we can run some codes... Can we do that ? I think there a class available for that. Click to expand... Are you sure? Do you mean for B4A? Those toast messages will be within its main application only (they are "in-app" toast message). Sorry if I am wrong. Thanks Last edited: Jan 10, 2013
XverhelstX said: As far as i know, it is impossible to add a button to a toastmessage. You should create your own custom toast message. I think there a class available for that. Regards, Tomas Verstuurd van mijn R800i met Tapatalk Click to expand... No, I don't mean to add a button to the toast and we have click event for that button. What I meant is a click event on the toast itself, when we click directly on the toast message, for example. I want the user can have possibility to close the toast, for example, or we can run some codes... Can we do that ? I think there a class available for that. Click to expand... Are you sure? Do you mean for B4A? Those toast messages will be within its main application only (they are "in-app" toast message). Sorry if I am wrong. Thanks
fotosettore Member Licensed User Longtime User Mar 14, 2013 #26 nice!! sorry ... i know i'm the millionth that asks for adding ... :sign0089: i think that your library should need of "DISAPPEAR" command vs "SHOW". this should be use during a loop if i use 10000 as ms and the loop ends before, i'd be able to turn off the message. i tried to overlap it but i find no way to delete it ... many thanks peppe
nice!! sorry ... i know i'm the millionth that asks for adding ... :sign0089: i think that your library should need of "DISAPPEAR" command vs "SHOW". this should be use during a loop if i use 10000 as ms and the loop ends before, i'd be able to turn off the message. i tried to overlap it but i find no way to delete it ... many thanks peppe
demasi Active Member Licensed User Longtime User Mar 30, 2013 #27 Good job! I like your library very much. It's possible to make the toast message background transparent? it would be nice too if you can have a null or blank message, in order to show only the image.
Good job! I like your library very much. It's possible to make the toast message background transparent? it would be nice too if you can have a null or blank message, in order to show only the image.
Jmu5667 Well-Known Member Licensed User Longtime User Jun 5, 2013 #28 Lovely Work ! Hi Is there any chance you can include a method to hide or destroy the message. Also if the duration was Zero or -1 this could be used to show the message until you issue the hid or destroy command. Cheers John.:sign0089:
Lovely Work ! Hi Is there any chance you can include a method to hide or destroy the message. Also if the duration was Zero or -1 this could be used to show the message until you issue the hid or destroy command. Cheers John.:sign0089:
merlin2049er Well-Known Member Licensed User Longtime User Aug 27, 2013 #29 Sweet. I can definitely use this.
merlin2049er Well-Known Member Licensed User Longtime User Aug 28, 2013 #30 Great, got it plugged in. Now do images need to have a transparent background to display nicely?
NeoTechni Well-Known Member Licensed User Longtime User Jul 27, 2014 #31 I just want to change the color of the toast and text, and the font itself. How would I do that? Maybe even the corner radius if possible.
I just want to change the color of the toast and text, and the font itself. How would I do that? Maybe even the corner radius if possible.
C Chris Williams Member Licensed User Longtime User Feb 7, 2015 #32 Hello XverhelstX. I have created an app that I am going to put in Google Play that makes use of your library. I would like to know what I need to do to give you proper credit for your work before I publish it ( I already have a credits page)
Hello XverhelstX. I have created an app that I am going to put in Google Play that makes use of your library. I would like to know what I need to do to give you proper credit for your work before I publish it ( I already have a credits page)
Andy Barker Member Licensed User Longtime User Feb 15, 2015 #33 This was really helpful for me - wanted a toast message to show for a while, and from a Service. Can confirm it works a treat. Thanks.
This was really helpful for me - wanted a toast message to show for a while, and from a Service. Can confirm it works a treat. Thanks.
B BKuvaki Member Licensed User Longtime User Dec 7, 2015 #34 Hi XverhelstX, great work thank you very much. I have tested the lib in a app and have seen that the toast always appears two times. I call the toast as shown in the forum: ct1.ShowBitmap("hallo1234",10000,Gravity.FILL,0,0,bmp) do I miss something? THX
Hi XverhelstX, great work thank you very much. I have tested the lib in a app and have seen that the toast always appears two times. I call the toast as shown in the forum: ct1.ShowBitmap("hallo1234",10000,Gravity.FILL,0,0,bmp) do I miss something? THX
B BKuvaki Member Licensed User Longtime User Dec 7, 2015 #35 OK my misstake, but maybe a good experience! The duration was long and i showed other standard toast messages while the customtoast was showing. The result was that the customtoast came back when the others had finished.
OK my misstake, but maybe a good experience! The duration was long and i showed other standard toast messages while the customtoast was showing. The result was that the customtoast came back when the others had finished.