FBToast

General

Category
Free
Tag
Toasts
License
N/A
Min SDK
19 (Android 4.4 KitKat)
Registered
Oct 4, 2018
Favorites
1
Link
https://github.com/NaimishTrivedi/FBToast
See also
CoolToast
Pretty Toast
AchievementView
DropDownWarning
Cue

Additional

Language
Java
Version
1.0 (Sep 19, 2018)
Created
Sep 18, 2018
Updated
Oct 4, 2018 (Retired)
Owner
Naimish Trivedi (NaimishTrivedi)
Contributor
Naimish Trivedi (NaimishTrivedi)
1
Activity
Badge
Generate
Download
Source code

FBToast

Custom toast messages.

  • You can create customizable toast messages with FBToast.
  • Use FBToast.LENGTH_SHORT or FBToast.LENGTH_LONG for toast display duration.
  • You can use Gravity.BOTTOM, Gravity.TOP, Gravity.LEFT or Gravity.RIGHT for toast position on screen.

Native Toast

 FBToast.nativeToast(MainActivity.this,"This is Native Toast",FBToast.LENGTH_SHORT);

Success Toast

 FBToast.successToast(MainActivity.this,"This is Success Toast",FBToast.LENGTH_SHORT);

Warning Toast

  FBToast.warningToast(MainActivity.this,"This is Warning Toast",FBToast.LENGTH_SHORT);

Error Toast

  FBToast.errorToast(MainActivity.this,"This is Error Toast",FBToast.LENGTH_SHORT);

Info Toast

  FBToast.infoToast(MainActivity.this,"This is Info Toast",FBToast.LENGTH_SHORT); 

Custom Toast

  FBCustomToast fbCustomToast = new FBCustomToast(MainActivity.this);
   fbCustomToast.setMsg("This is Custom Toast");
   fbCustomToast.setIcon(ContextCompat.getDrawable(MainActivity.this,R.drawable.ic_android_white_24dp));
   fbCustomToast.setBackgroundDrawable(ContextCompat.getDrawable(MainActivity.this,R.drawable.bg_gradient));
   fbCustomToast.setTypeface(Typeface.createFromAsset(getAssets(),"font/PoppinsBold.ttf"));
   fbCustomToast.show(); 

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.NaimishTrivedi:FBToast:1.0'
}