Skip to content

Commit 6c0a6fa

Browse files
isShowing added
1 parent bd3a44b commit 6c0a6fa

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Provides you easily create various pop-up dialogs that you can use.
7777
positiveClickListener(PositiveClick click) // set listener to positive button
7878
negativeClickListener(NegativeClick click) // set listener to negative button
7979
dismissListener(DismissListener dismissListener) // set dismiss listener to fast-dialog
80+
isShowing() // return is fast-dialog showing
8081
show() //show dialog
8182
dismiss() //dismiss dialog
8283
getInputText() // get dialog EditText's text
@@ -140,13 +141,12 @@ Provides you easily create various pop-up dialogs that you can use.
140141
```
141142
<img width="300px" src="images/input_number.gif" align="center"/>
142143

143-
> Information Dialog position bottom, slide bottom animation and listener positive button
144+
> Information Dialog position bottom, slide bottom animation and listener positive button and dismiss listener
144145
```java
145146
FastDialog dialog = new FastDialogBuilder(this,Type.INFO)
146147
.setTitleText("Information")
147148
.setText("Information Text")
148149
.positiveText("Ok")
149-
.negativeText("Cancel")
150150
.setAnimation(Animations.SLIDE_BOTTOM)
151151
.setPosition(Positions.BOTTOM)
152152
.create();
@@ -157,6 +157,12 @@ Provides you easily create various pop-up dialogs that you can use.
157157
dialog.dismiss();
158158
}
159159
});
160+
dialog.dismissListener(new DismissListener() {
161+
@Override
162+
public void onDismiss(DialogInterface dialog) {
163+
FastDialog.i(MainActivity.this).setText("Closed").hideTitle().create().show();
164+
}
165+
});
160166
dialog.show();
161167
```
162168
<img width="300px" src="images/bottom_dialog.gif" align="center"/>

fastdialog/src/main/java/karpuzoglu/enes/com/fastdialog/FastDialog.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,7 @@ public void negativeClickListener(NegativeClick click){
5656
builder.negativeClickListener(click);
5757
}
5858
public void dismissListener(DismissListener dismissListener){builder.setDismissListener(dismissListener);}
59+
public boolean isShowing(){
60+
return builder.getDialog().isShowing();
61+
}
5962
}

0 commit comments

Comments
 (0)