Git Product home page Git Product logo

cooltoast's Introduction

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);

cooltoast's People

Contributors

nadimgouia avatar

Stargazers

CloverClub03 avatar Ayoub Ghozzi avatar hassan entabi avatar  avatar  avatar Hervino Nzau avatar Developer³ avatar Joshi Tushar avatar Joshi Tushar avatar Murat Öter avatar Bhargav Pandya avatar  avatar  avatar Harshad Prajapati avatar Nisarg avatar Ahmed Rebai avatar Pranav Lathigara avatar Samir BEN HAMAD avatar Majdi Zerelli avatar  avatar

Watchers

 avatar Developer³ avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.