5
5
[ ![ ] ( https://jitpack.io/v/mejdi14/Flat-Dialog-Android.svg )] ( https://jitpack.io/#mejdi14/Flat-Dialog-Android )
6
6
7
7
<p align =" center " >
8
- <img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/dialogic .png " height =" 250 " width =" 300 " >
8
+ <img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/flatdialog .png " height =" 300 " width =" 300 " >
9
9
</p>
10
10
11
11
## Installation
@@ -19,7 +19,7 @@ allprojects {
19
19
maven { url "https://jitpack.io" }
20
20
}
21
21
}
22
- ```
22
+ ```
23
23
## Dependency
24
24
25
25
Add this to your module's ` build.gradle ` file (make sure the version matches the JitPack badge above):
@@ -32,10 +32,10 @@ dependencies {
32
32
```
33
33
34
34
## Screenshots
35
- <img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/image1.jpg " height =" 420 " width =" 260 " hspace =" 20 " ><img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/image2.jpg " height =" 420 " width =" 260 " hspace =" 20 " ><img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/image3.jpg " height =" 420 " width =" 260 " >
36
- <img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/image4.jpg " height =" 420 " width =" 260 " hspace =" 20 " ><img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/image5.jpg " height =" 420 " width =" 260 " hspace =" 20 " >
35
+ <img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/image1.jpg " height =" 580 " width =" 260 " hspace =" 20 " ><img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/image2.jpg " height =" 580 " width =" 260 " hspace =" 20 " ><img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/image3.jpg " height =" 580 " width =" 260 " >
36
+ <img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/image4.jpg " height =" 580 " width =" 260 " hspace =" 20 " ><img src =" https://github.com/mejdi14/Flat-Dialog-Android/blob/master/screenshots/image5.jpg " height =" 580 " width =" 260 " hspace =" 20 " >
37
37
38
- ## How to use
38
+ ## How to use with java
39
39
40
40
``` java
41
41
final FlatDialog flatDialog = new FlatDialog (ExempleActivity . this );
@@ -60,6 +60,25 @@ dependencies {
60
60
.show();
61
61
```
62
62
63
+ ## How to use with kotlin
64
+
65
+ ``` java
66
+ val flatDialog = FlatDialog(this @MainActivity )
67
+ flatDialog. setTitle(" Login" )
68
+ .setSubtitle(" write your profile info here" )
69
+ .setFirstTextFieldHint(" email" )
70
+ .setSecondTextFieldHint(" password" )
71
+ .setFirstButtonText(" CONNECT" )
72
+ .setSecondButtonText(" CANCEL" )
73
+ .withFirstButtonListner {
74
+ // do something ...
75
+ }
76
+ .withSecondButtonListner {
77
+ flatDialog. dismiss()
78
+ }
79
+ .show()
80
+ ```
81
+
63
82
## More useful methods
64
83
<table >
65
84
<tr >
0 commit comments