/Custom-Toast

Tired of the standard toast message? Try our library

Primary LanguageKotlin

Simple Custom Toast

An easy-to-use custom toast library for Android, designed to enrich your applications with beautifully styled toast messages.

Credits

Design inspired by and credited to Anastasia D.

Table of Contents

Installation

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")

Usage

Follow these steps to use the Simple Custom Toast in your Android application.

  1. 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)
  1. 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)

Attributes

Duration
Duration.SHORT
Duration.LONG
Styles Image
Type.SUCCESS image
Type.FAIL image
Type.INFO image

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.