B4A Library ToastMessageShow v2.10

ToastMessageShow
Author:
Giuseppe Salvi
Version: 2.0
 

Attachments

  • ToastMessageShow v1.80.zip
    293 KB · Views: 1,660
  • Normal toast from  xml.png
    Normal toast from xml.png
    24.2 KB · Views: 2,606
  • Normal toast with nine-patch.png
    Normal toast with nine-patch.png
    27.4 KB · Views: 2,515
  • standard toast.png
    standard toast.png
    22.7 KB · Views: 2,309
  • Toast with button and bacckground image.png
    Toast with button and bacckground image.png
    117.4 KB · Views: 2,238
  • Toast with button background color and text shadow.png
    Toast with button background color and text shadow.png
    42.2 KB · Views: 2,236
  • Toast with buttton and resources nine-patch.png
    Toast with buttton and resources nine-patch.png
    81.7 KB · Views: 2,208
  • Toast with buttton and with background resources.png
    Toast with buttton and with background resources.png
    77.8 KB · Views: 2,276
  • Toast with buttton gradient and custom font.png
    Toast with buttton gradient and custom font.png
    190.4 KB · Views: 2,282
  • ToastMessageShowv2.10.zip
    50.2 KB · Views: 1,466
Last edited:

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
    ScreenshotA.png
    49.9 KB · Views: 404
  • ScreenshotB.png
    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
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.

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
 
Top