|
|
@@ -31,6 +31,10 @@ public class PinConfirmDialog extends DialogBase {
|
|
|
|
|
|
private CustomPinView customPinView;
|
|
|
private IPinContract.Presenter pinPresenter;
|
|
|
+ private boolean isResetButtonVisible;
|
|
|
+ public static final int USER_INFORMATION = 0;
|
|
|
+ public static final int USER_QUIT = 1;
|
|
|
+ public static final int COUPON_MALL = 2;
|
|
|
|
|
|
@Override
|
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
|
@@ -65,7 +69,7 @@ public class PinConfirmDialog extends DialogBase {
|
|
|
getDialog().getWindow().getAttributes().windowAnimations = R.style.DialogAnimation;
|
|
|
|
|
|
customPinView = new CustomPinView(getContext());
|
|
|
- pinPresenter = new CustomPinInputPresenter(customPinView, new IPinContract.Listener() {
|
|
|
+ pinPresenter = new CustomPinInputPresenter(customPinView, isResetButtonVisible, new IPinContract.Listener() {
|
|
|
@Override
|
|
|
public void onPinResult(String result) {
|
|
|
if (null != getCustomListener()) {
|
|
|
@@ -116,4 +120,19 @@ public class PinConfirmDialog extends DialogBase {
|
|
|
pinPresenter.retry();
|
|
|
}
|
|
|
|
|
|
+ public void setResetButtonVisible(int confirmDialogType) {
|
|
|
+ switch (confirmDialogType) {
|
|
|
+ case USER_INFORMATION:
|
|
|
+ isResetButtonVisible = true;
|
|
|
+ break;
|
|
|
+ case USER_QUIT:
|
|
|
+ isResetButtonVisible = false;
|
|
|
+ break;
|
|
|
+ case COUPON_MALL:
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|