B4A Library ToastMessageShow v2.10

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi All, ToastMessageShow is updated v1.40 what's new:

ERROR_ICON
INFO_ICON
SUCCESS_ICON
WARNING_ICON

the icons have been removed from the library and put in assets folder so U can change the icons but please give the same name or U'll get error file not found.


If U wish to show any different icon with any different name use this way below:

B4X:
Sub Button1_Click

   toast.Location = toast.LEFT_TOP

   toast.Show4("ToastMessageShow","Hi Guys"&CRLF&"This is a new library"&CRLF&"of the new Toast Message",LoadBitmap(File.DirAssets,"adobe.png"))

End Sub

fixed for gingerbread too.

the zip include the demo, lib and license.

In files folder the Icons.
 
Last edited:

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi All, ToastMessageShow is updated v1.50 what's new:

RoundedRect
LoadFontFromAssets
TextTypeFace.LoadFontFromAssets
LoadFontFromFile
TextTypeFace.LoadFontFromFile
TextTypeFace
TextStyle

Changed:

toast.Gravity.TLeft instead of toast.TEXT_LEFT
toast.Gravity.TCenter instead of toast.TEXT_CENTER
toast.Gravity.TRight instead of toast.TEXT_RIGHT

1 bug fixed.
 

Glen Ponder

Member
Licensed User
Longtime User
Hi lonleystar, this is exactly what I am looking for. However, I am trying to replicate the toast message which Chrome displays when a tab is closed - see Screenshot A.

Screenshot B was taken from your CustomToast example, which I modified the Font, Text Size, Background Color etc.

Is it possible to develop the following:

1) Increase the height of the toast? See Screenshot A's height.
2) Set the Location to Bottom-Center however with an offset so the toast doesn't sit directly at the bottom? See Screenshot A's location.
3) Pad the toast either side. See Screenshot B's text. This has been padded with 7 character spaces on either side.
4) Similar to Chrome have a separator and a button to the side of the text, either before or after. I feel this might be too tricky and I don't necessary require this now, however I think it would be a "nice to have"!

Many thanks
 

Attachments

  • ScreenshotA.png
    49.9 KB · Views: 404
  • ScreenshotB.png
    107.5 KB · Views: 413

Dadeda

Member
Licensed User
Longtime User
Would it also be possible to add buttons to toastmessage if needed, like the ok, no, cancel ?
It would be a perfect dialog substitute.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi guys, ToastMessageShow is updated to v1.60 what's new:

Added:

PaddingLeft - Sets the padding, in pixels, of the left edge
PaddingTop - Sets the padding, in pixels, of the top edge
PaddingRight - Sets the padding, in pixels, of the right edge
PaddingBottom - Sets the padding, in pixels, of the bottom edge

Width - Sets the width of the toast.
Height - Sets the height of the toast.
AxisX - Sets the x-axis position.
AxisY - Sets the y-axis position.
 

Dadeda

Member
Licensed User
Longtime User
Are you going to include the button propertie in your lib? I'm asking this because i would love to include you lib in our app, but it is essencial to control it also with buttons, as in this example :
I open toadmessage and i'm displying some information, but i want to make sure that the user acknowlege's the message, so i can't use the duration propertie, i really need a button click to proceed.
 

lonleystar

Well-Known Member
Licensed User
Longtime User

Hi, not yet because I'm doing the new rotate animation , but dont be worry I think at the end of this week I'll do promise
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…