Skip to content
Custom toast messages.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
fbtoast
gradle/wrapper
.gitignore
README.md
build.gradle
customtoast.png
errortoast.png
gradle.properties
gradlew
gradlew.bat
infotoast.png
nativetoast.png
settings.gradle
successtoast.png
warningtoast.png

README.md

API Android Arsenal

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

alt text

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

Success Toast

alt text

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

Warning Toast

alt text

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

Error Toast

alt text

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

Info Toast

alt text

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

Custom Toast

alt text

  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'
}
You can’t perform that action at this time.