B4A Library ToastMessageShow v2.10

lonleystar

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

ShowDialogButton
- Show or hide the buttons - by default is hidden


ShowOkButton - True or False - by default is hidden
ShowNoButton - True or False - by default is hidden
ShowCancelButton - True or False - by default is hidden

SetOkTextButton - by default is "Ok"
SetNoTextButton - by default is "No"
SetCancelTextButton - by default is "Cancel"


Tag return the tag of the button ( OK_BUTTON , NO_BUTTON , CANCEL_BUTTON )

Events:

ButtonClick(Index As Int,Tag As Object)
ButtonLongClick(Index As Int,Tag As Object)

Index Return -1 For Ok button , -2 for No button and -3 for Cancel button.

Tag like Tag above.
 

Attachments

  • ToastMessageShowWithButton.png
    44.6 KB · Views: 428

Shay

Well-Known Member
Licensed User
Longtime User
is there any toast_done ?
I wish to do something once message is gone (after showing the message)
 

MhdBoy

Member
Licensed User
Longtime User
very useful
how i can use the color
i don't konw this format color! : 0x77553377

what's this hex color: #1BA39C ?
how i can convert color?
 

DonManfred

Expert
Licensed User
Longtime User
B4X:
Sub GetColor(hex As String) As Double
    Dim bc As ByteConverter
    Dim r,g,b As Int
    ' 0xE3E2E1
    Log(hex.SubString2(1,3))
    r = Bit.ParseInt(hex.SubString2(1,3), 16)
    g = Bit.ParseInt(hex.SubString2(3,5), 16)
    b = Bit.ParseInt(hex.SubString2(5,7), 16)
    Return Colors.RGB(r, g, b)
End Sub

B4X:
Log(GetColor("#1BA39C"))
 

iz0ndg

Active Member
Licensed User
Longtime User
I'm sorry, but to me the buttons do not work ! ( With your example app)
Tried on two physical devices (S3 cyano11, thl w200s stock)
 

lonleystar

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

Added:

TextColor2
TitleColor2

BackGroundColor2
ToastDone


B4X:
toast.TextColor2 = "#ffa500"

toast.TitleColor2 = "#b33ecd"

toast.BackGroundColor2  = "#603b64"

'*******************************

Sub toast_ToastDone
   
ToastMessageShow("Done",False)
   
End Sub
 

uri kupfer

New Member
Licensed User
Longtime User
hi lonleystar
i think that there is a little error in th library , you have to add this line:
"ToastMessageShowWrapper._showToast.setView(_mainLayout);"
to "public void onTick" in "class TimeExpander".
uri
 

lonleystar

Well-Known Member
Licensed User
Longtime User
hi lonleystar
i think that there is a little error in th library , you have to add this line:
"ToastMessageShowWrapper._showToast.setView(_mainLayout);"
to "public void onTick" in "class TimeExpander".
uri

Hi, what do you mean for the little error.
 

uri kupfer

New Member
Licensed User
Longtime User
hi, without this line i get an error , i have nexus 4 with android 5, after th android 5 instalation i got this error.
 

Shay

Well-Known Member
Licensed User
Longtime User
Hi

Is there a way to put background image instead of color?
 

TheMightySwe

Active Member
Licensed User
Longtime User
Hi, do you think its possible to get this toast with a border, it already looks really nice, but with a border it would look perfect.

Regards,
TMS
 

Tom1s

Member
Licensed User
Longtime User
Hi

Is it normal that if I call:
B4X:
toast.Location = toast.Gravity.CENTER_BOTTOM
toast.Show3("Hello",toast.INFO_ICON)
for example and duration is 10000(10s), I cant get any other toast.show3 to show ?
If I call toast.stop before the next toast.show3 it goes "grazy" and blinks.

Normal ToastMessageShow("Hello2" ,True) shows.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…