Skip to content

Harshad09/ToastWallet-Android

Repository files navigation

ToastWallet-Android

platform API

Connect with me on LinkedIn

An Android library to create nice Toasts.

Prerequisites

Add this in your root build.gradle file (not your module build.gradle file):

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

Dependency

Add this to your module's build.gradle file (make sure the version matches the JitPack badge above):

dependencies {
	        implementation 'com.github.Harshad09:ToastWallet-Android:0.1.0'
	}

Usage

To display round error Toast:

ToastWallet.errorRoundToast(context,"This is an Error Toast");

To display a success Toast:

ToastWallet.successRoundToast(context,"This is a Success Toast");

To display an info Toast:

ToastWallet.infoRoundToast(context,"This is a Info Toast");

To display a warning Toast:

ToastWallet.warningRoundToast(context,"This is a Success Toast");

To display Toast with time duration :

ToastWallet.errorRoundToast(context,"This is an Error Toast",int duration);

Similarly you can display square shaped toast:

ToastWallet.errorSquareToast(context,"This is an Error Toast");

To display Toast with time duration :

ToastWallet.successSquareToast(context,"This is an Error Toast",int duration);