Meg Toast

A lightweight and customizable Android Toast library for displaying messages in your Android applications.

Installation

To use this library in your Android project, add the following dependency to your settings.gradle file:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

and in your app module’s build.gradle file

dependencies {
	        implementation 'com.github.bymaskeli53:MegToast:v1.0.1'
	}

Usage

// Show successful toast message for 5 seconds.
 MegToast.makeToast(
                this ,
                MegToastTypes.SUCCESS ,
                "Network" ,
                "Network is successful",
                durationInSeconds = 5)

// Show error toast message for 3 seconds.
MegToast.makeToast(
                this ,
                MegToastTypes.ERROR ,
                "Network" ,
                "There is an error in network.",
                durationInSeconds = 3
            )

Output

success_image

error_image

GitHub

View Github