GifDialog

Additional

Language
Kotlin
Version
v0.0.4 (Jun 21, 2018)
Created
Jun 20, 2018
Updated
Jun 22, 2018 (Retired)
Owner
Hussain Chachuliya (aliwaris0572)
Contributor
Hussain Chachuliya (aliwaris0572)
1
Activity
Badge
Generate
Download
Source code

GifDialog

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. :)

||

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}'
    }