Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 1.07 KB

README.md

File metadata and controls

46 lines (38 loc) · 1.07 KB

Material Design Top/Bottom Toast Bar.

How to implement

![screen-gif](./sample/2016_11_25_10_11_11_10_17_19.gif)

Add it in your root build.gradle at the end of repositories:

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

Step 2. Add the dependency

    dependencies {
	        compile 'com.github.SwiftyWang:ToastBar:release~1.1'
	}

Support in the application or in the window.

Toast style to use:

with container view:

    public void onBottomToast(View view) {
        BottomToast.make((ViewGroup) findViewById(R.id.parent), context, "HELLO WORLD!!!!", 3000).show();
    }

    public void onTopToast(View view) {
        TopToast.make((ViewGroup) findViewById(R.id.parent), context, "HELLO WORLD!!!!", 3000).show();
    }

without container view(attach as overlay)

    public void onBottomToast(View view) {
        BottomToast.make(context, "HELLO WORLD!!!!", 3000).show();
    }

    public void onTopToast(View view) {
        TopToast.make(context, "HELLO WORLD!!!!", 3000).show();
    }