Skip to content

Create and show and hide a loading animation(alternative to progressDialog that is deprecated).

License

Notifications You must be signed in to change notification settings

tuliocll/Android-Easy-Loading-Dialog

Repository files navigation

Language Platforms

Android-Easy-Loading-Dialog

Create and show and hide a loading animation(alternative to progressDialog that is deprecated).

We use Glide to load and play the gif!.

Loading Dialog preview

Install

This class are tested with API 16 - 28, so i think it will be compatible with all android versions.

Import Glide library

How to install here.

Import LoadingDialog.java and custom_loading_dialog_layout.xml

Import a GIF to you Drawable folder (sample free loading gifs)

Usage

Call it on yout activity

LoadingDialog loadingDialog = new LoadingDialog(Activity.this);
loadingDialog.setLoadImage(R.drawable.loading);
loadingDialog.show();
//to dissmis use: loadingDialog.hide();

Methods

method name Type Default Description
setLoadImage int 0 Set the id of drawable(gif) to glide
setCancelable boolean false If user can cancel the dialog
show void null Show dialog
hide void null Hide the dialog

License

Apache License 2.0

About

Create and show and hide a loading animation(alternative to progressDialog that is deprecated).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages