oktavianto / StatusBarToast

Display text on your StatusBar! (like Telegram X)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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();

About

Display text on your StatusBar! (like Telegram X)

License:MIT License


Languages

Language:Java 100.0%