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,998 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
C cnicolapc Active Member Licensed User Longtime User Aug 31, 2011 #2 hi, and 'still special, thank you. Nicola
H hdtvirl Active Member Licensed User Longtime User Aug 31, 2011 #4 Custom Toast control. Nice control thank you.
pluton Active Member Licensed User Longtime User Sep 1, 2011 #5 It is great. I saw on web examples of toast message in eclipse. Is it possible like on the pictures Does it possible to made library with make toast message like this: Link where is explained is: Code: http://www.codeproject.com/KB/android/toasts-android.aspx :sign0188:
It is great. I saw on web examples of toast message in eclipse. Is it possible like on the pictures Does it possible to made library with make toast message like this: Link where is explained is: Code: http://www.codeproject.com/KB/android/toasts-android.aspx :sign0188:
XverhelstX Well-Known Member Licensed User Longtime User Sep 1, 2011 #6 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. E.g Code: Dim btmp As Bitmap btmp.Initialize(File.DirAssets,"rs.png") Dim ct1 As CustomToast ct1.Initialize ct1.ShowBitmap("This is a custom toast message.",10000,Gravity.FILL,0,0,btmp) 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 Last edited: Sep 1, 2011
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. E.g Code: Dim btmp As Bitmap btmp.Initialize(File.DirAssets,"rs.png") Dim ct1 As CustomToast ct1.Initialize ct1.ShowBitmap("This is a custom toast message.",10000,Gravity.FILL,0,0,btmp) 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
Rick in North Carolina Member Licensed User Longtime User Sep 1, 2011 #7 Very good... I was looking forward for the option to display a graphic in a toast message. Rick
S ssg Well-Known Member Licensed User Longtime User Sep 2, 2011 #9 Thanx a bunch for this excellent piece of work, XverhelstX! Using it in my new game , just hot out of the oven in the market: https://market.android.com/details?id=com.madelephantstudios.numberrunner&feature=search_result Easy to use library, will be a commonly used library in most of my games / apps! Looking forward to what you'll cook up next!
Thanx a bunch for this excellent piece of work, XverhelstX! Using it in my new game , just hot out of the oven in the market: https://market.android.com/details?id=com.madelephantstudios.numberrunner&feature=search_result Easy to use library, will be a commonly used library in most of my games / apps! Looking forward to what you'll cook up next!
XverhelstX Well-Known Member Licensed User Longtime User Sep 2, 2011 #10 Thanks guys! Feels good to help out other people and 'expand' B4A with new libraries. I'm already started my next library and I hope to get it released later today. @ SSG, seems like a nice game. i think the Custom Toast with the trophee actually fits it. :icon_clap: Nice work XverhelstX Last edited: Sep 3, 2011
Thanks guys! Feels good to help out other people and 'expand' B4A with new libraries. I'm already started my next library and I hope to get it released later today. @ SSG, seems like a nice game. i think the Custom Toast with the trophee actually fits it. :icon_clap: Nice work XverhelstX
A alibaba Member Licensed User Longtime User Nov 2, 2011 #11 Great Work many thanks ! :sign0098: Is it possible do change the Font Size ? regards
N Nyptop Active Member Licensed User Longtime User Dec 19, 2011 #12 Thanks for the Brilliant Library Is it possible to have an 'ok' button like in a normal toast message with this feature? Neil
Thanks for the Brilliant Library Is it possible to have an 'ok' button like in a normal toast message with this feature? Neil
pluton Active Member Licensed User Longtime User Dec 19, 2011 #13 Nyptop said: Thanks for the Brilliant Library Is it possible to have an 'ok' button like in a normal toast message with this feature? Neil Click to expand... I think that toastmessage doesn't have "OK" button or any button. Did you mix it with MsgBox ???
Nyptop said: Thanks for the Brilliant Library Is it possible to have an 'ok' button like in a normal toast message with this feature? Neil Click to expand... I think that toastmessage doesn't have "OK" button or any button. Did you mix it with MsgBox ???
N Nyptop Active Member Licensed User Longtime User Dec 19, 2011 #14 Oh dear yes, could you set me on the right track for finding out how to do this with an MsgBox. Thanks again, Neil
Oh dear yes, could you set me on the right track for finding out how to do this with an MsgBox. Thanks again, Neil
vb1992 Well-Known Member Licensed User Longtime User Dec 20, 2011 #15 Long thread to wade through but worth it: http://www.b4x.com/forum/additional-libraries-official-updates/6776-dialogs-library.html#post39303
Long thread to wade through but worth it: http://www.b4x.com/forum/additional-libraries-official-updates/6776-dialogs-library.html#post39303
P pamoxi Member Licensed User Longtime User Feb 8, 2012 #17 Change font size Is it possible to add the ability to change the size and font color? Thank you, excellent library.
Change font size Is it possible to add the ability to change the size and font color? Thank you, excellent library.
XverhelstX Well-Known Member Licensed User Longtime User Feb 8, 2012 #18 I don't think it is possible unless you write your own xml code. android - how to set color of Toast Text - Stack Overflow Tomas
I don't think it is possible unless you write your own xml code. android - how to set color of Toast Text - Stack Overflow Tomas
S salmander Active Member Licensed User Longtime User Jun 14, 2012 #19 The toast message on android has a slight transparency. Can you add this into this library please?