Skip to content
This repository has been archived by the owner on Nov 13, 2021. It is now read-only.

Latest commit

 

History

History
48 lines (38 loc) · 1.36 KB

README.md

File metadata and controls

48 lines (38 loc) · 1.36 KB

StatusBarToast

GitHub top language license Download

Displaying text on your StatusBar!(Telegram-X like)

Features

  • Display Progress Bar
  • Change Text Dynamically
  • Toggle Progress Bar States

demo

Usage

  • Add following code to your build.gradle:
compile 'com.imkiva.statusbar.toast:library:1.0-1'
  • Unlimited Duration Toast:
// create a toast and show it
StatusBarToast toast = new StatusBarToast.Builder(this)
        .setText("Connecting")
        .setShowProgressBar(true)
        .setDuration(StatusBarToast.DURATION_UNLIMITED)
        .setBackgroundColorResource(R.color.colorPrimaryDark)
        .build();
toast.show();

// somewhere else
toast.dismiss();
  • Auto Hide Toast
new StatusBarToast.Builder(this)
        .setText("Connecting")
        .setShowProgressBar(true)
        .setDuration(StatusBarToast.DURATION_LONG)
        .setBackgroundColorResource(R.color.colorPrimaryDark)
        .show();