Skip to content

Toaster - A beautiful Toast Library for Android

Notifications You must be signed in to change notification settings

saadiftkhar/toaster

Repository files navigation

Toaster - A beautiful Toast Library for Android

API API API

Demo App

image info

How to configure dependency

To get a Git project into your build:

Gradle

  • build.gradle (Project level) or settings.gradle

    allprojects {
       repositories {
       	maven { url 'https://jitpack.io' }
       }
    }
    
  • build.gradle (Module: app)

    dependencies {
        implementation 'com.github.saadiftkhar:toaster:Tag'
     }
    

Usage

Sample Code for - Toaster

Pass the paramater by using Named Arguments specially for optional paramters

  • Success Toast

     Toaster.success(
         context = this,
         text = "this is success toast",
         font = R.font.basier_circle      // optional
      )
    
  • Error Toast

    Toaster.error(
        context = this,
        text = "this is error toast",
        font = R.font.basier_circle      // optional
     )
    
  • Delete Toast

    Toaster.delete(
        context = this,
        text = "this is delete toast",
        font = R.font.basier_circle      // optional
     )
    
  • Warning Toast

    Toaster.warning(
        context = this,
        text = "this is warning toast",
        font = R.font.basier_circle      // optional
     )
    
  • Info Toast

    Toaster.info(
        context = this,
        text = "this is info toast",
        font = R.font.basier_circle      // optional
     )
    

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.