项目作者: MohamedNajib

项目描述 :
Custom toasts for Android.
高级语言: Java
项目地址: git://github.com/MohamedNajib/ToastMessag.git
创建时间: 2019-08-12T09:10:00Z
项目社区:https://github.com/MohamedNajib/ToastMessag

开源协议:

下载


ToastMessag

Custom ToastMessag For Ease use Toast with good view

ToastMessag library


s wiCapturen

How to integrate the ToastMessag library in your app?


Add this in your root build.gradle file
  1. allprojects {
  2. repositories {
  3. ...
  4. maven { url 'https://jitpack.io' }
  5. }
  6. }
For AndroidX Add the dependency in your build.gradle file
  • make sure the version matches the JitPack badge above
    1. dependencies {
    2. implementation 'com.github.MohamedNajib:ToastMessag:1.1.0'
    3. }
    If you still using Android support library in your android apps Add the dependency in your build.gradle file
    1. dependencies {
    2. implementation 'com.github.MohamedNajib:Support_ToastMessag:1.1.0'
    3. }

Usage


Success Toast:

  1. ToastMessage.setSuccess(yourContext,"Success Toast", ToastMessage.LENGTH_LONG, true).show();

Info Toast:

  1. ToastMessage.setInfo(yourContext, "Info Toast", ToastMessage.LENGTH_SHORT, true).show();

Warning Toast:

  1. ToastMessage.setWarning(yourContext, "Warning Toast", ToastMessage.LENGTH_SHORT, true).show();

Error Toast:

  1. ToastMessage.setError(yourContext, "Error Toast", ToastMessage.LENGTH_SHORT, true).show();

Normal Toast:

  1. ToastMessage.setNormal(yourContext, "Normal Toast", ToastMessage.LENGTH_LONG).show();