KToast

General

Category
Free
Tag
Toasts
License
N/A
Min SDK
16 (Android 4.1 Jelly Bean)
Registered
Mar 11, 2018
Favorites
3
Link
https://github.com/onurkagan/KToast
See also
BalloonPopup
Quicktoast
Toasty
FancyToast
Toaster

Additional

Language
Java
Version
1.0.3 (Mar 7, 2019)
Created
Feb 21, 2018
Updated
Apr 19, 2020 (Retired)
Owner
Onur Kağan ALDEMİR (onurkagan)
Contributors
Onur Kağan ALDEMİR (onurkagan)
Mahdi Sy (maxis7567)
Nishchal Raj (thenishchalraj)
3
Activity
Badge
Generate
Download
Source code

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 {
  implementation 'com.github.onurkagan:ktoast:1.0.3'
}