Android library for Custom Toast
allprojects {
repositories {
…
maven { url ‘https://jitpack.io‘ }
}
}
dependencies {
compile ‘com.github.shelake-chetan1.0.2’
}
private CustomToast customToast;
customToast = new CustomToast(this); //pass context as parameter
customToast.setTextColor(context.getResources().getColor(R.color.white));
customToast.setBackground(context.getResources().getColor(R.color.app_color));
customToast.showErrorToast("Some error occurred, please try again");
customToast.showNetworkToast();
customToast.showSuccessToast("I have successfully registered my interest");