Super Toast

General

Category
Free
Tag
Toasts
License
MIT License
Min SDK
16 (Android 4.1 Jelly Bean)
Registered
Nov 17, 2018
Favorites
1
Link
https://github.com/akhilbv1/CustomToastLibrary
See also
CookieBar2
SimpleToast
Toaster
RTL Toast
GlideToast

Additional

Language
Kotlin
Version
v1.0.2 (Dec 5, 2018)
Created
Nov 12, 2018
Updated
Nov 26, 2019 (Retired)
Owner
akhilbv1
Contributors
akhilbv1
Indra Patel (protoncluster)
2
Activity
Badge
Generate
Download
Source code

Advertisement

Super Toast Library

Written Purely in Kotlin❤️

Usual Toast but with super powers!!! 💪

A Fully Customised and Customisable Toast.

]( https://android-arsenal.com/details/1/7328 )

Type Output
Success
Warning
Error
Information
Default

Gradle Dependencies

Please do check release notes for latest version.

      implementation 'com.github.akhilbv1:CustomToastLibrary:v1.0.2'

Add Jitpack to repositories in Project level Build.Gradle

repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }

How To Call

 CustomToast.makeText(this, Toast.LENGTH_SHORT,CustomToast.DEFAULT, "Toast is working",false).show();
Method Paramter Description
makeDefaultToast() Context context,String message Default Toast
makeSuccessToast() Context context,String message,int shouldShowIcon Success Toast with message and icon visibility
makeErrorToast() Context context,String message, int shouldShowIcon Error Toast with message and icon visibility
makeWarningToast() Context context, String message, int shouldShowIcon Warning Toast with message and icon visibility
makeInfoToast() @NonNull Context context, String message, int shouldShowIcon Information Toast with message and icon visibility

How to add Custom Layout

please make sure your Custom Layout Textview id is toastMessage otherwise Exception will be thrown.

    CustomToastView.makeText(this@Sample,Toast.LENGTH_SHORT,"Toast is working",R.layout.toast)

To show your layout without altering

    CustomToastView.makeText(this@Sample,Toast.LENGTH_SHORT,R.layout.toast)

If direct call to makeText is popping any error then please use CustomToatView.build (name of companion object)

Future Release Points

  • Add Animations

All commits are welcomed!!