B4A Library ToastMessageShow v2.10

ToastMessageShow
Author:
Giuseppe Salvi
Version: 2.0
 

Attachments

  • ToastMessageShow v1.80.zip
    293 KB · Views: 1,654
  • Normal toast from  xml.png
    Normal toast from xml.png
    24.2 KB · Views: 2,595
  • Normal toast with nine-patch.png
    Normal toast with nine-patch.png
    27.4 KB · Views: 2,506
  • standard toast.png
    standard toast.png
    22.7 KB · Views: 2,301
  • Toast with button and bacckground image.png
    Toast with button and bacckground image.png
    117.4 KB · Views: 2,229
  • Toast with button background color and text shadow.png
    Toast with button background color and text shadow.png
    42.2 KB · Views: 2,223
  • Toast with buttton and resources nine-patch.png
    Toast with buttton and resources nine-patch.png
    81.7 KB · Views: 2,200
  • Toast with buttton and with background resources.png
    Toast with buttton and with background resources.png
    77.8 KB · Views: 2,267
  • Toast with buttton gradient and custom font.png
    Toast with buttton gradient and custom font.png
    190.4 KB · Views: 2,273
  • ToastMessageShowv2.10.zip
    50.2 KB · Views: 1,460
Last edited:

MaFu

Well-Known Member
Licensed User
Longtime User
I would like to ask you too, what is the meaning of this string in "Region Project Attributes "?
#CustomBuildAction: 1, c:\windows\system32\attrib.exe, +r res\*.* /s
This code marks all files under res folder as read-only and prevent the compiler from deleting them.
 

MaFu

Well-Known Member
Licensed User
Longtime User
If i use this library i have to keep this string in my project?
Thanks.
All your resource files in the res folder must be readonly, otherwise B4A deletes the files during compilation.
If you always set the readonly flag on this files this line isn't needed.
But for safety this line is good for all your projects, regardless of this library.

You can add this in your projects:
B4X:
#CustomBuildAction: 1, c:\windows\system32\attrib.exe, +r res\*.* /s
#CustomBuildAction: 4, c:\windows\system32\attrib.exe, -r res\*.* /s
This sets the readonly flag on the resource files before compilation and remove the flag afterwards.
Then your files are save and you can edit it without hassle.
 

Kapelis

Member
Licensed User
Longtime User
All your resource files in the res folder must be readonly, otherwise B4A deletes the files during compilation.
If you always set the readonly flag on this files this line isn't needed.
But for safety this line is good for all your projects, regardless of this library.

You can add this in your projects:
B4X:
#CustomBuildAction: 1, c:\windows\system32\attrib.exe, +r res\*.* /s
#CustomBuildAction: 4, c:\windows\system32\attrib.exe, -r res\*.* /s
This sets the readonly flag on the resource files before compilation and remove the flag afterwards.
Then your files are save and you can edit it without hassle.
Thank you very much
 

Kapelis

Member
Licensed User
Longtime User
Hi, is there any limit for the button "name" ?
with this code my app crashes returning a "java.lang.nullpointerexception" message:
B4X:
.withButton("A-View.", "B-Ins. ", "C-On") _
after change the code like this everuthing ok:
B4X:
.withButton("A-View.", "B-Ins. ", "C-On call") _
Thank you very much.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi, is there any limit for the button "name" ?
with this code my app crashes returning a "java.lang.nullpointerexception" message:
B4X:
.withButton("A-View.", "B-Ins. ", "C-On") _
after change the code like this everuthing ok:
B4X:
.withButton("A-View.", "B-Ins. ", "C-On call") _
Thank you very much.


Hi, there is no limit

I tried with this .withButton("A-View.", "B-Ins.", "C-On") _ and work fine
 

Attachments

  • pic.png
    pic.png
    26.3 KB · Views: 315
Last edited:

rogersantosferreira

Member
Licensed User
Longtime User
Hi Lonleystar!
Why this lib limits the textsize to a maximum value of 20 (.TextSize.VERY_LARGE)?
In the previous version of this lib (I think, was 1.7) I was able to put any value that I wanted.

This limits me seriously to update to the new version: 2.0.
There is a way to solve this?
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi Lonleystar!
Why this lib limits the textsize to a maximum value of 20 (.TextSize.VERY_LARGE)?
In the previous version of this lib (I think, was 1.7) I was able to put any value that I wanted.

This limits me seriously to update to the new version: 2.0.
There is a way to solve this?
Hi, to solve your question Example:

toast.withTextSize(10) instead .withTextSize(toast.TextSize.VERY_LARGE)
 

Mobsens

New Member
Licensed User
Longtime User
Hi lonelystar,

Where can I find codesample and pdf for v2.1 as Zip only contains jar and xml.
 

Harris

Expert
Licensed User
Longtime User
Hi, the maximum value is fix please download the new version 2.10 to sets it over the maximum value refer post #88
GREAT! I have been waiting for this... Shall try it soonest.
Thanks!
 

Harris

Expert
Licensed User
Longtime User
How does one make the toast wider? I have set 15 px for t,l,r,b padding.

Thanks

toast_cust.png
 

rogersantosferreira

Member
Licensed User
Longtime User
Hi!
Can I make the message last until the user touch it?
I'm making some kind of app to help children with learning difficulties, and the parents ask me to give the possibility of maintain the message on screen until child dismisses it.

Can it be done with version 2.10?
Thanks in advance!
 

incendio

Well-Known Member
Licensed User
Longtime User
Has anyone tried this
B4X:
toast.create("test").withBackGroundGradient("#FF1c71d3","#FF1c62d3").Show

I got an error
java.lang.NullPointerException
at android.graphics.drawable.GradientDrawable.ensureValidRect(GradientDrawable.java:708)
at android.graphics.drawable.GradientDrawable.draw(GradientDrawable.java:425)
at it.giuseppe.salvi.notification.core.ToastShow.Show(ToastShow.java:1253)
at it.giuseppe.salvi.notification.core.library.ToastMessageShow.Show(ToastMessageShow.java:1078)

B4A ver 5.80.
 

uniplan

Active Member
Licensed User
Longtime User
Hi guys, toastmessageshow is updated to v2. What's new:
The zip contains a demo, the library, the license and a little explanation in pdf.

I found the updated library but in the zip file, there are no demo and pdf files you mention. Where can I find them?
 
Top