|
1 | | -# FancyGifDialog-Android |
2 | | -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. |
| 1 | +# FancyAlertDialog-Android |
| 2 | +[](https://www.android.com) |
| 3 | +[](https://android-arsenal.com/api?level=15) |
| 4 | +[](https://www.apache.org/licenses/LICENSE-2.0.html) |
| 5 | +[](https://jitpack.io/#Shashank02051997/FancyGifDialog-Android) |
| 6 | +[](https://android-arsenal.com/details/1/6652) |
| 7 | + |
| 8 | +<a href="https://play.google.com/store/apps/details?id=com.shashank.sony.fancylibrarybyshashank"> |
| 9 | + <img alt="Get it on Google Play" |
| 10 | + height="80" |
| 11 | + src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" /> |
| 12 | +</a> |
| 13 | + |
| 14 | +## Prerequisites |
| 15 | + |
| 16 | +Add this in your root `build.gradle` file (**not** your module `build.gradle` file): |
| 17 | + |
| 18 | +```gradle |
| 19 | +allprojects { |
| 20 | + repositories { |
| 21 | + ... |
| 22 | + maven { url "https://jitpack.io" } |
| 23 | + } |
| 24 | +} |
| 25 | +``` |
| 26 | + |
| 27 | +## Dependency |
| 28 | + |
| 29 | +Add this to your module's `build.gradle` file (make sure the version matches the JitPack badge above): |
| 30 | + |
| 31 | +```gradle |
| 32 | +dependencies { |
| 33 | + ... |
| 34 | + implementation 'com.github.Shashank02051997:FancyGifDialog-Android:1.2' |
| 35 | +} |
| 36 | +``` |
| 37 | +## Fancy Gif Dialog |
| 38 | + |
| 39 | +Dialog with two buttons: |
| 40 | + |
| 41 | +``` java |
| 42 | +new FancyGifDialog.Builder(this) |
| 43 | + .setTitle("Granny eating chocolate dialog box") |
| 44 | + .setMessage("This is a granny eating chocolate dialog box. This library is used to help you easily create fancy gify dialog.") |
| 45 | + .setNegativeBtnText("Cancel") |
| 46 | + .setPositiveBtnBackground("#FF4081") |
| 47 | + .setPositiveBtnText("Ok") |
| 48 | + .setNegativeBtnBackground("#FFA9A7A8") |
| 49 | + .setGifResource(R.drawable.gif1) //Pass your Gif here |
| 50 | + .isCancellable(true) |
| 51 | + .OnPositiveClicked(new FancyGifDialogListener() { |
| 52 | + @Override |
| 53 | + public void OnClick() { |
| 54 | + Toast.makeText(MainActivity.this,"Ok",Toast.LENGTH_SHORT).show(); |
| 55 | + } |
| 56 | + }) |
| 57 | + .OnNegativeClicked(new FancyGifDialogListener() { |
| 58 | + @Override |
| 59 | + public void OnClick() { |
| 60 | + Toast.makeText(MainActivity.this,"Cancel",Toast.LENGTH_SHORT).show(); |
| 61 | + } |
| 62 | + }) |
| 63 | + .build(); |
| 64 | +``` |
| 65 | + |
| 66 | +Dialog with one button: |
| 67 | + |
| 68 | +``` java |
| 69 | +new FancyGifDialog.Builder(this) |
| 70 | + .setTitle("Granny eating chocolate dialog box") |
| 71 | + .setMessage("This is a granny eating chocolate dialog box. This library is used to help you easily create fancy gify dialog.") |
| 72 | + .setPositiveBtnText("Ok") |
| 73 | + .setPositiveBtnBackground("#FF4081") |
| 74 | + .setGifResource(R.drawable.gif1) //Pass your Gif here |
| 75 | + .isCancellable(true) |
| 76 | + .OnPositiveClicked(new FancyGifDialogListener() { |
| 77 | + @Override |
| 78 | + public void OnClick() { |
| 79 | + Toast.makeText(MainActivity.this,"Ok",Toast.LENGTH_SHORT).show(); |
| 80 | + } |
| 81 | + }) |
| 82 | + .build(); |
| 83 | +``` |
| 84 | + |
| 85 | +## Screenshots |
| 86 | + |
| 87 | +**Please click the image below to enlarge.** |
| 88 | + |
| 89 | + |
| 90 | +<img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_215855.gif" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_220303.gif" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_220829.gif" height="420" width="240"> |
| 91 | + |
| 92 | +<img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_221054.gif" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_221227.gif" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/20180106_221357.gif" height="420" width="240"> |
| 93 | + |
| 94 | +<img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/Screenshot_2018-01-07-10-24-37.png" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/Screenshot_2018-01-07-10-25-07.png" height="420" width="240" hspace="20"><img src="https://github.com/Shashank02051997/FancyGifDialog-Android/blob/master/Screenshot/Screenshot_2018-01-07-10-25-26.png" height="420" width="240"> |
| 95 | + |
| 96 | +## Dependencies |
| 97 | + |
| 98 | +This project use this libraries ~ Thanks to them. |
| 99 | + |
| 100 | + [android-gif-drawable](https://github.com/koral--/android-gif-drawable) |
| 101 | + |
| 102 | +## Contributing |
| 103 | + |
| 104 | +Please fork this repository and contribute back using |
| 105 | +[pull requests](https://github.com/Shashank02051997/FancyGifDialog-Android/pulls). |
| 106 | + |
| 107 | +Any contributions, large or small, major features, bug fixes, are welcomed and appreciated |
| 108 | +but will be thoroughly reviewed . |
| 109 | + |
| 110 | +### Contact - Let's become friend |
| 111 | +- [Twitter](https://twitter.com/shashank020597) |
| 112 | +- [Github](https://github.com/Shashank02051997) |
| 113 | +- [Linkedin](https://www.linkedin.com/in/shashank-singhal-a87729b5/) |
| 114 | +- [Facebook](https://www.facebook.com/shashanksinghal02) |
| 115 | + |
| 116 | +## License |
| 117 | + |
| 118 | +* [Apache Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) |
| 119 | + |
| 120 | +``` |
| 121 | +Copyright 2018 Shashank Singhal |
| 122 | +
|
| 123 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 124 | +you may not use this file except in compliance with the License. |
| 125 | +You may obtain a copy of the License at |
| 126 | +
|
| 127 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 128 | +
|
| 129 | +Unless required by applicable law or agreed to in writing, software |
| 130 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 131 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 132 | +See the License for the specific language governing permissions and |
| 133 | +limitations under the License. |
0 commit comments