Skip to content

aliwaris0572/GifDialog

Repository files navigation

GifDialog

Android Arsenal

Custom loading dialog library in Kotlin

This library aims to help in creating beautiful loading dialogs with animated gifs. Thanks a lot to Fresco, without which it would not be possible for me to create this. :)

|Image|

How to use?

  1. Initialize -

val dialog = GifDialog.with(this)

  1. Configure -

dialog!! .isCancelable(false) .setText("Loading...") .setTextSize(18) .setTextBackgroundColor(ContextCompat.getColor(this, android.R.color.white)) .setTextColor(ContextCompat.getColor(this, android.R.color.holo_red_dark)) .setResourceId(R.drawable.giphy5)

  1. Show dialog (**with TAG) -

dialog?.showDialog("TAG_NAME")

  1. Dismiss dialog (**with TAG) -

dialog?.dismissDialog("TAG_NAME")

Easy enough!!! :) For more customization, refer sample application code.

Gradle

Add it in your root build.gradle at the end of repositories

allprojects {
	    repositories {
		    ...
		    maven { url 'https://jitpack.io' }
	    }
    }

Then, add this in you app level build.gradle

dependencies {
            implementation 'com.github.aliwaris0572:GifDialog:{latest_version}'
    }

About

Custom dialog with gif

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages