/ Notifications

An Android library to build flying animated toast message

An Android library to build flying animated toast message

GlideToast

GlideToast is a android library to implement flying Toast Animation.

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

     

GitHub