Skip to content

Android Custom Toast notification with different colors. Toast of Normal, Info, Success, Warning, Error. Each Toast have diffrent color and icon. Simple and Easy to Use

License

Notifications You must be signed in to change notification settings

manimaran96/ToastUtils

Repository files navigation

ToastUtils - Library

  • Android Custom Toast notification with different colors.
  • Toast of Normal, Info, Success, Warning, Error.
  • Each Toast have diffrent color and icon.
  • Simple and Easy to Use

Demo App - Click here

Screen Shots


Toast Messages


How To Use

  1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories
 allprojects {	repositories {	...	maven { url 'https://jitpack.io' }	} }
  1. Add the dependency
 dependencies { implementation 'com.gitlab.manimaran:toastutils:v1.0'	}
  1. Inside Java Code
 // Short ToastUtils.showShort(getApplicationContext(), "Short Toast"); // Long ToastUtils.showLong(getApplicationContext(), "Long Toast"); // Custom ToastUtils.showCustom(getApplicationContext(), "Custom Toast for 3sec", 3000); // 3sec - duration // Info - Short ToastUtils.showInfoShort(getApplicationContext(), "Info Toast - Short"); // Success - Short ToastUtils.showSuccessShort(getApplicationContext(), "Success Toast - Short"); // Warning - Short ToastUtils.showWarningShort(getApplicationContext(), "Warning Toast - Short"); // Error - Short ToastUtils.showErrorShort(getApplicationContext(), "Error Toast - Short"); // Info - Long ToastUtils.showInfoLong(getApplicationContext(), "Info Toast - Long"); // Success - Long ToastUtils.showSuccessLong(getApplicationContext(), "Success Toast - Long"); // Warning - Long ToastUtils.showWarningLong(getApplicationContext(), "Warning Toast - Long"); // Error - Long ToastUtils.showErrorLong(getApplicationContext(), "Error Toast - Long"); // Info - Custom ToastUtils.showInfoCustom(getApplicationContext(), "Info Toast - Custom for 3sec", 3000); // Success - Custom ToastUtils.showSuccessCustom(getApplicationContext(), "Success Toast - Custom for 3sec", 3000); // Warning - Custom ToastUtils.showWarningCustom(getApplicationContext(), "Warning Toast - Custom for 3sec", 3000); // Error - Custom ToastUtils.showErrorCustom(getApplicationContext(), "Error Toast - Custom for 3sec", 3000); 

About

Android Custom Toast notification with different colors. Toast of Normal, Info, Success, Warning, Error. Each Toast have diffrent color and icon. Simple and Easy to Use

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages