KToast

Customizable toast messages.

View the Project on GitHub onurkagan/KToast

KToast

API Android Arsenal Downloads Twitter Follow

Custom toast messages.

*K is not kotlin.

Cases :

Examples :

// Success
KToast.successToast(YourActivity.this, "This is a success toast.", Gravity.BOTTOM, KToast.LENGTH_AUTO);

// Info
KToast.infoToast(YourActivity.this, "This is a info toast.", Gravity.BOTTOM, KToast.LENGTH_SHORT);

// Normal
KToast.normalToast(YourActivity.this, "This is a normal toast.", Gravity.BOTTOM, KToast.LENGTH_LONG, R.drawable.ic_infinite_white);

// Warning
KToast.warningToast(YourActivity.this, "This is a warning toast.", Gravity.BOTTOM, KToast.LENGTH_AUTO);

// Error
KToast.errorToast(YourActivity.this, "This is a error toast.", Gravity.BOTTOM, KToast.LENGTH_AUTO);

// Custom Color
KToast.customColorToast(YourActivity.this, "This is a custom color toast.", Gravity.BOTTOM, KToast.LENGTH_AUTO, R.color.fuchsia, R.drawable.ic_infinite_white);

// Custom Drawable
KToast.customBackgroudToast(YourActivity.this, "This is a custom drawable toast.", Gravity.BOTTOM, KToast.LENGTH_AUTO, R.drawable.background_toast, null ,R.drawable.ic_infinite_white);

Installation

Step 1. Add the JitPack repository to your build file.

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

Step 2. Add the dependency

dependencies {
  implementation 'com.github.onurkagan:ktoast:1.0.3'
}