项目作者: shelake-chetan

项目描述 :
Android library for Custom Toast
高级语言: Java
项目地址: git://github.com/shelake-chetan/CustomToast.git
创建时间: 2018-01-26T08:16:42Z
项目社区:https://github.com/shelake-chetan/CustomToast

开源协议:

下载


CustomToast

capture3
capture2
capture4

Android Arsenal

Step 1. Add the JitPack repository to your build file

allprojects {
repositories {

maven { url ‘https://jitpack.io‘ }
}
}

Step 2. Add the dependency in build.gradle file

dependencies {
compile ‘com.github.shelake-chetan:CustomToast:1.0.2’
}

Step 3. Initialise Custom Toast first

  1. private CustomToast customToast;
  2. customToast = new CustomToast(this); //pass context as parameter
  3. customToast.setTextColor(context.getResources().getColor(R.color.white));
  4. customToast.setBackground(context.getResources().getColor(R.color.app_color));

Step 4. Show toast as error,success or network error

  1. customToast.showErrorToast("Some error occurred, please try again");
  2. customToast.showNetworkToast();
  3. customToast.showSuccessToast("I have successfully registered my interest");