Git Product home page Git Product logo

glidetoast's Introduction

GlideToast

An Android library to build flying animated toast message.


Releases:

Current release: 1.0

You can see all the library releases here.


Screenshots

    

Download the sample apk here.


Usage:

Adding the depencency

Add this to your root build.gradle file:

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

Now add the dependency to your app build.gradle file:

  implementation 'com.github.imjeevandeshmukh:GlideToast:1.0'
	

Creating the GlideToast with Java

Here is a complete snippet of it usage:

### USE CASE 1:Simple GlideToast;
     
     1st parameter = Activity
     2nd parameter = String
     3rd parameter = int i.e., duration
     
### SAMPLE CODE:
     
     new GlideToast.makeToast(MainActivity.this,"Some random text here", GlideToast.LENGTHLONG).show();
     
### USE CASE 2:Style GlideToast;
     
     1st parameter = Activity
     2nd parameter = String
     3rd parameter = int i.e., duration
     4th parameter = string style i.e., 
            DEFAULTTOAST
            SUCCESSTOAST
            FAILTOAST
            WARNINGTOAST
            INFOTOAST
            CUSTOMTOAST(When you pass in CUSTOMTOAST,you must pass in icon and background color using use case 4 or case 4 construtor)
	    
### SAMPLE CODE:
     
     
    new GlideToast.makeToast(MainActivity.this,"Some random text here", GlideToast.LENGTHLONG,GlideToast.SUCCESSTOAST).show();
    
    
### USE CASE 3:Set Gravity to GlideToast;
     
      1st parameter = Activity
     2nd parameter = String
     3rd parameter = int i.e., duration
     4th parameter = String style i.e.,6 Options to select from. (default is DEFAULTTOAST)
            1.DEFAULTTOAST
            2.SUCCESSTOAST
            3.FAILTOAST
            4.WARNINGTOAST
            5.INFOTOAST
            6.CUSTOMTOAST(When you pass in CUSTOMTOAST,you must pass in icon and background color using use case 4 or case 4 construtor)
	    5th parameter = int gravity i.e.,
	    1.TOP
	    2.BOTTOM
	    3.CENTER
	    
### SAMPLE CODE:
     
     
     new GlideToast.makeToast(MainActivity.this,"Some random text here",GlideToast.LENGTHLONG,GlideToast.SUCCESSTOAST,GlideToast.TOP).show();
     
     
### USE CASE 4:Custom background color and icon to GlideTOAST;
     
     1st parameter = Activity
     2nd parameter = String
     3rd parameter = int i.e., duration
     4th parameter = String style i.e.,6 Options to select from. (default is DEFAULTTOAST)
            1.DEFAULTTOAST
            2.SUCCESSTOAST
            3.FAILTOAST
            4.WARNINGTOAST
            5.INFOTOAST
            6.CUSTOMTOAST(When you pass in CUSTOMTOAST,you must pass in icon and background color using this construtor)
     5th parameter = int gravity i.e.,
	    1.TOP
	    2.BOTTOM
	    3.CENTER
     6th parameter = int icon i.e.,drawable icon
     7th parameter = String color i.e.,pass in hex color code in a string.
     
 ### SAMPLE CODE:
       
       
     new GlideToast.makeToast(MainActivity.this,"Some random text here",GlideToast.LENGTHLONG,GlideToast.SUCCESSTOAST,GlideToast.TOP,R.drawable.someicon,"#ffffff").show();

     

License

MIT License

Copyright (c) 2018 imjeevandeshmukh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

glidetoast's People

Contributors

imjeevandeshmukh avatar jeevan-antariksh avatar

Watchers

 avatar  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.