Skip to content

Design Toast for Android Developers, no need to create a custom Toast method in your project, use this Library for display a Custom Cool Toast in your projects.

License

Notifications You must be signed in to change notification settings

dev-aniketj/roasted-toast

Repository files navigation

RoastedToast ❤️🔥

platform API 1.0.2

"Buy Me A Coffee"

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.dev-aniketj:roasted-toast:1.0.2'
	}

Usage

To display an normal Toast:

Toasty.normal(context, "Normal Toast");

To display an success Toast:

Toasty.success(context, "Success Toast");

To display an error Toast:

Toasty.error(context, "Error Toast");

To display an warning Toast:

Toasty.warning(context, "Warning Toast");

Screenshots

Custom Toast 🔥❤️🔥

To display the custom Toast:

There is many ways to write a custom Toast, use anyone of them to create a custom Toast.

Way 1:

Toasty.custom(Context context, String message, int drawable, String backgroundColor, int textSize, String textColor)

Example 1:

Toasty.custom(context, "Custom Toast", R.drawable.icon, "#ff3300", 16, "#f9f9f9");

Way 2:

Toasty.custom(Context context, String message, int gravity, int duration, int drawable, String backgroundColor, int textSize, String textColor)

Example 2:

Toasty.custom(context, "Custom Toast", Gravity.BOTTOM, Toast.LENGTH_SHORT, R.drawable.icon, "#ff3300", 16, "#f9f9f9");

Contributing

Please fork this repository and contribute back. Any contributions, large or small, major or minor features, bug fixes, are welcomed and appreciated but will be thoroughly reviewed.

Thank you.

About

Design Toast for Android Developers, no need to create a custom Toast method in your project, use this Library for display a Custom Cool Toast in your projects.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages