Make your native android Dialog Fancy and Gify
FancyAlertDialog-Android
Make your native android Dialog Fancy and Gify. A library that takes the standard Android Dialog to the next level with a variety of styling options and Gif's. Style your dialog from code.
Prerequisites
Add this in your root build.gradle
file (not your module build.gradle
file):
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
Dependency
Add this to your module's build.gradle
file (make sure the version matches the JitPack badge above):
dependencies {
...
compile 'com.github.Shashank02051997:FancyGifDialog-Android:1.1'
}
Fancy Gif Dialog
new FancyGifDialog.Builder(this)
.setTitle("Granny eating chocolate dialog box")
.setMessage("This is a granny eating chocolate dialog box. This library is used to help you easily create fancy gify dialog.")
.setNegativeBtnText("Cancel")
.setPositiveBtnBackground("#FF4081")
.setPositiveBtnText("Ok")
.setNegativeBtnBackground("#FFA9A7A8")
.setGifResource(R.drawable.gif1) //Pass your Gif here
.isCancellable(true)
.OnPositiveClicked(new FancyGifDialogListener() {
@Override
public void OnClick() {
Toast.makeText(MainActivity.this,"Ok",Toast.LENGTH_SHORT).show();
}
})
.OnNegativeClicked(new FancyGifDialogListener() {
@Override
public void OnClick() {
Toast.makeText(MainActivity.this,"Cancel",Toast.LENGTH_SHORT).show();
}
})
.build();
Screenshots
Please click the image below to enlarge.