Skip to content

Commit f87b592

Browse files
committed
update dialog
1 parent a81dfb8 commit f87b592

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

AndroidCore/src/main/java/cn/beingyi/androidcore/base/BaseDialog.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public BaseDialog(Context context) {
4949
//p.alpha = 0.9f;
5050
dialog.getWindow().setGravity(config.getGravity());
5151
dialog.getWindow().setAttributes(p);
52-
dialog.getWindow().setWindowAnimations(R.style.ActionSheetDialogAnimation);
52+
if(config.isShowAnim()) {
53+
dialog.getWindow().setWindowAnimations(R.style.ActionSheetDialogAnimation);
54+
}
5355

5456
}
5557

@@ -109,6 +111,7 @@ public class Config{
109111
private boolean hasBgShadow;
110112
private int gravity;
111113
private boolean canCancelable;
114+
private boolean showAnim;
112115

113116
public boolean isHasBgShadow() {
114117
return hasBgShadow;
@@ -133,6 +136,15 @@ public boolean isCanCancelable() {
133136
public void setCanCancelable(boolean canCancelable) {
134137
this.canCancelable = canCancelable;
135138
}
139+
140+
141+
public boolean isShowAnim() {
142+
return showAnim;
143+
}
144+
145+
public void setShowAnim(boolean showAnim) {
146+
this.showAnim = showAnim;
147+
}
136148
}
137149

138150
}

0 commit comments

Comments
 (0)