Popularity
1.4
Growing
Activity
3.8
-
20
2
7

Description

A really simple library that help you to display a custom toast with many colors (for : success, warning, danger, info, dark, light, primary...etc ), or with rounded corners, or even with image.

Programming language: Java
Tags: UI     Android     UI Widget     Toast Widget     Layout Widget     Java     Views     Custom View     Android-library    

CoolToast alternatives and similar packages

Based on the "Toast Widget" category

Do you think we are missing an alternative of CoolToast or a related project?

Add another 'Toast Widget' Package

README

CoolToast

A really simple library that help you to display a custom toast with many colors (for : success, warning, danger, info, dark, light, primary...etc ), or with rounded corners, or even with image.

Gradle

compile on your dependencies dependencies { compile 'com.ndroid.nadim:cool-toast:1.0' }

ScreenShot

Sample Example

Sample Module

Usage

To create a new cool toast CoolToast coolToast = new CoolToast(this); coolToast.make("Your first cool toast ! ");

To set the style of your cool toast //you have many style that you can use for your toast ( SUCCESS, DANGER, WARNING, INFO, PRIMARY, DARK, LIGHT) coolToast.make("That is a red cool toast ! ", CoolToast.DANGER); //or you can set the style with setStyle() method coolToast.setStyle(CoolToast.DANGER); coolToast.make("That is a red cool toast ! ");

To set duration, position or make a rounded Toast //display the toast at the center of screen (you can use : CoolToast.LEFT, CoolToast.RIGHT, CoolToast.CENTER) coolToast.setPosition(CoolToast.CENTER); //make the corners round coolToast.setRounded(true); //set the duration (it can be CoolToast.SHORT or CoolToast.LONG...) //By default it is : CoolToast.LONG coolToast.setDuration(CoolToast.SHORT); coolToast.make("Info with image", CoolToast.INFO);

Display a Cool Toast With Custom icon coolToast.setIcon(R.drawable.like); coolToast.make("Info with image", CoolToast.INFO, CoolToast.LONG);