Skip to content

Commit ed565bf

Browse files
author
shashank singhal
committed
Merge branch 'yerenutku-master'
2 parents 1a02da8 + 47bbe50 commit ed565bf

File tree

9 files changed

+206
-99
lines changed

9 files changed

+206
-99
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 133 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,133 @@
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+
[![platform](https://img.shields.io/badge/platform-Android-yellow.svg)](https://www.android.com)
3+
[![API](https://img.shields.io/badge/API-15%2B-brightgreen.svg?style=plastic)](https://android-arsenal.com/api?level=15)
4+
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0.html)
5+
[![](https://jitpack.io/v/Shashank02051997/FancyGifDialog-Android.svg)](https://jitpack.io/#Shashank02051997/FancyGifDialog-Android)
6+
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-FancyGifDialog-brightgreen.svg?style=flat)](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.
276 KB
Loading
264 KB
Loading
257 KB
Loading

app/src/main/java/com/shashank/sony/fancygifdialoglibrary/MainActivity.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,36 @@
1111

1212
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
1313
Button b1;
14+
1415
@Override
1516
protected void onCreate(Bundle savedInstanceState) {
1617
super.onCreate(savedInstanceState);
1718
setContentView(R.layout.activity_main);
18-
b1=findViewById(R.id.button);
19+
b1 = findViewById(R.id.button);
1920
b1.setOnClickListener(this);
2021
}
22+
2123
@Override
2224
public void onClick(View view) {
2325
new FancyGifDialog.Builder(this)
2426
.setTitle("Granny eating chocolate dialog box")
2527
.setMessage("This is a granny eating chocolate dialog box. This library is used to help you easily create fancy gify dialog.")
26-
.setNegativeBtnText("Cancel")
2728
.setPositiveBtnBackground("#FF4081")
2829
.setPositiveBtnText("Ok")
30+
.setNegativeBtnText("Cancel")
2931
.setNegativeBtnBackground("#FFA9A7A8")
3032
.setGifResource(R.drawable.gif1)
3133
.isCancellable(true)
3234
.OnPositiveClicked(new FancyGifDialogListener() {
3335
@Override
3436
public void OnClick() {
35-
Toast.makeText(MainActivity.this,"Ok",Toast.LENGTH_SHORT).show();
37+
Toast.makeText(MainActivity.this, "Ok", Toast.LENGTH_SHORT).show();
3638
}
3739
})
3840
.OnNegativeClicked(new FancyGifDialogListener() {
3941
@Override
4042
public void OnClick() {
41-
Toast.makeText(MainActivity.this,"Cancel",Toast.LENGTH_SHORT).show();
43+
Toast.makeText(MainActivity.this, "Cancel", Toast.LENGTH_SHORT).show();
4244
}
4345
})
4446
.build();

0 commit comments

Comments
 (0)