An easy-to-use custom toast library for Android, designed to enrich your applications with beautifully styled toast messages.
Design inspired by and credited to Anastasia D.
To integrate Simple Custom Toast into your Android project, add the following configuration to your settings.gradle
file:
maven {
setUrl("https://jitpack.io")
}
Then, you can add configuration to your build.gradle
in app module:
implementation("com.github.NallDev:Custom-Toast:1.0.0")
Follow these steps to use the Simple Custom Toast in your Android application.
- Create an instance of
NalToast
You can create a new instance of NalToast by passing the context and the style type you want.
val customToast = NalToast(binding.root, Type.SUCCESS)
- Display the toastTo show the toast, use the
show
method of the instance you created. Specify the message and the duration.
customToast.show("Hello World", Duration.SHORT)
Duration |
---|
Duration.SHORT |
Duration.LONG |
Styles | Image |
---|---|
Type.SUCCESS |
|
Type.FAIL |
|
Type.INFO |
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.