KToast

General

Category
Free
Tag
Toasts
License
N/A
Min SDK
16 (Android 4.1 Jelly Bean)
Registered
Mar 11, 2018
Favorites
1
Link
https://github.com/onurkagan/KToast
See also
Cue
Crouton
AchievementToast
CookieBar2
GentleToast

Additional

Language
Java
Version
1.0.2 (Feb 26, 2018)
Created
Feb 21, 2018
Updated
Oct 25, 2018
Owner
Onur Kağan ALDEMİR (onurkagan)
Contributors
Onur Kağan ALDEMİR (onurkagan)
nishchalraj
2
Activity
Badge
Generate
Download
Source code
APK file

Show card

KToast

Custom toast messages.

  • You can create customizable toast messages with KToast.
  • Use KToast.LENGTH_AUTO for unnormally long texts.
  • You can use Gravity.BOTTOM, Gravity.TOP, Gravity.LEFT or Gravity.RIGHT for toast position on screen.

*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 {
  compile 'com.github.onurkagan:ktoast:1.0.2'
}