Skip to content

Commit 0b290d3

Browse files
bug fixed
1 parent 006adc2 commit 0b290d3

File tree

5 files changed

+17
-50
lines changed

5 files changed

+17
-50
lines changed

.idea/assetWizardSettings.xml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Provides you easily create various pop-up dialogs that you can use.
8282
show() //show dialog
8383
dismiss() //dismiss dialog
8484
getInputText() // get dialog EditText's text
85+
setProgressText(String str) // set Progress dialog text
8586

8687
```
8788
## Examples

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import android.view.View;
66
import android.widget.Button;
77
import android.widget.EditText;
8+
import android.widget.TextView;
89

910
/**
1011
* Created by ENES on 7.12.2018.
@@ -49,6 +50,12 @@ public String getInputText(){
4950
}
5051
return text;
5152
}
53+
public void setProgressText(String str){
54+
if (builder.getType() == Type.PROGRESS){
55+
TextView textView = builder.getDialog().findViewById(R.id.wait_text);
56+
textView.setText(str);
57+
}
58+
}
5259
public void positiveClickListener(PositiveClick click){
5360
builder.positiveClickListener(click);
5461
}

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ public class FastDialogBuilder {
3636
private NegativeClick negativeClick;
3737
private DismissListener dismissListener;
3838
private boolean isDecimal = false;
39+
private Type type;
3940

4041

4142
public FastDialogBuilder(@NonNull Context context,@NonNull Type dialogType){
4243
this.context = context;
44+
this.type = dialogType;
4345
createDialog(dialogType);
4446
}
4547
private FastDialogBuilder createDialog(Type type){
@@ -255,6 +257,11 @@ public Dialog getDialog(){
255257
return dialog;
256258
}
257259

260+
public Type getType() {
261+
return type;
262+
}
258263

259-
264+
public void setType(Type type) {
265+
this.type = type;
266+
}
260267
}

0 commit comments

Comments
 (0)