|
@ -234,11 +234,10 @@ public class PayoutModeSendMoneyFragment extends BaseFragment implements SendMon |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private boolean focusOutAndHideKeyboard() { |
|
|
private boolean focusOutAndHideKeyboard() { |
|
|
if(ed_account.hasFocus()) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
if (ed_account.hasFocus()) { |
|
|
|
|
|
|
|
|
View currentViewWithFocus=rootView.getFocusedChild(); |
|
|
|
|
|
if(currentViewWithFocus!=null) |
|
|
|
|
|
|
|
|
View currentViewWithFocus = rootView.getFocusedChild(); |
|
|
|
|
|
if (currentViewWithFocus != null) |
|
|
currentViewWithFocus.clearFocus(); |
|
|
currentViewWithFocus.clearFocus(); |
|
|
|
|
|
|
|
|
hideKeyBoard(); |
|
|
hideKeyBoard(); |
|
@ -316,8 +315,8 @@ public class PayoutModeSendMoneyFragment extends BaseFragment implements SendMon |
|
|
paymentModeRvAdapter.setData(data); |
|
|
paymentModeRvAdapter.setData(data); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void setDataToPaymentModeWithDefaultSelected(List<PayoutMode> data,int selectedItemPosition) { |
|
|
|
|
|
paymentModeRvAdapter.setDataWithDefaultSelectedValue(data,selectedItemPosition); |
|
|
|
|
|
|
|
|
public void setDataToPaymentModeWithDefaultSelected(List<PayoutMode> data, int selectedItemPosition) { |
|
|
|
|
|
paymentModeRvAdapter.setDataWithDefaultSelectedValue(data, selectedItemPosition); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
@ -404,15 +403,16 @@ public class PayoutModeSendMoneyFragment extends BaseFragment implements SendMon |
|
|
if (isUIReady()) { |
|
|
if (isUIReady()) { |
|
|
showProgressBar(false, ""); |
|
|
showProgressBar(false, ""); |
|
|
if (payoutModeApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { |
|
|
if (payoutModeApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { |
|
|
setDataToPaymentModeWithDefaultSelected(payoutModeApiResponse.getData().getPayoutMode(),0); |
|
|
|
|
|
|
|
|
setDataToPaymentModeWithDefaultSelected(payoutModeApiResponse.getData().getPayoutMode(), 0); |
|
|
} else { |
|
|
} else { |
|
|
showPopUpMessage(payoutModeApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); |
|
|
showPopUpMessage(payoutModeApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
scheduleTaskLater(() -> { |
|
|
scheduleTaskLater(() -> { |
|
|
showProgressBar(false, ""); |
|
|
showProgressBar(false, ""); |
|
|
if (payoutModeApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { |
|
|
if (payoutModeApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { |
|
|
setDataToPaymentModeWithDefaultSelected(payoutModeApiResponse.getData().getPayoutMode(),0); |
|
|
|
|
|
|
|
|
setDataToPaymentModeWithDefaultSelected(payoutModeApiResponse.getData().getPayoutMode(), 0); |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
showPopUpMessage(payoutModeApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); |
|
|
showPopUpMessage(payoutModeApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); |
|
@ -425,12 +425,12 @@ public class PayoutModeSendMoneyFragment extends BaseFragment implements SendMon |
|
|
public void onFailed(String message) { |
|
|
public void onFailed(String message) { |
|
|
if (isUIReady()) { |
|
|
if (isUIReady()) { |
|
|
showProgressBar(false, ""); |
|
|
showProgressBar(false, ""); |
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED,null); |
|
|
|
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null); |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
scheduleTaskLater(() -> { |
|
|
scheduleTaskLater(() -> { |
|
|
showProgressBar(false, ""); |
|
|
showProgressBar(false, ""); |
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED,null); |
|
|
|
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null); |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@ -440,12 +440,12 @@ public class PayoutModeSendMoneyFragment extends BaseFragment implements SendMon |
|
|
protected void onConnectionNotEstablished(String message) { |
|
|
protected void onConnectionNotEstablished(String message) { |
|
|
if (isUIReady()) { |
|
|
if (isUIReady()) { |
|
|
showProgressBar(false, ""); |
|
|
showProgressBar(false, ""); |
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET,null); |
|
|
|
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null); |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
scheduleTaskLater(() -> { |
|
|
scheduleTaskLater(() -> { |
|
|
showProgressBar(false, ""); |
|
|
showProgressBar(false, ""); |
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET,null); |
|
|
|
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null); |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@ -465,20 +465,20 @@ public class PayoutModeSendMoneyFragment extends BaseFragment implements SendMon |
|
|
@Override |
|
|
@Override |
|
|
protected void onSuccess(AccountValidationApiResponse accountValidationApiResponse) { |
|
|
protected void onSuccess(AccountValidationApiResponse accountValidationApiResponse) { |
|
|
if (isUIReady()) { |
|
|
if (isUIReady()) { |
|
|
if (accountValidationApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) |
|
|
|
|
|
|
|
|
if (accountValidationApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { |
|
|
((SendMoneyActionListener) getActivity()).showAmountDetailPage(); |
|
|
((SendMoneyActionListener) getActivity()).showAmountDetailPage(); |
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
showPopUpMessage(accountValidationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED,null); |
|
|
|
|
|
|
|
|
((SendMoneyActionListener) getActivity()).prepareRemainingFragments(); |
|
|
|
|
|
} else { |
|
|
|
|
|
showPopUpMessage(accountValidationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
scheduleTaskLater(() -> { |
|
|
scheduleTaskLater(() -> { |
|
|
if (accountValidationApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) |
|
|
|
|
|
|
|
|
if (accountValidationApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { |
|
|
((SendMoneyActionListener) getActivity()).showAmountDetailPage(); |
|
|
((SendMoneyActionListener) getActivity()).showAmountDetailPage(); |
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
showPopUpMessage(accountValidationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED,null); |
|
|
|
|
|
|
|
|
((SendMoneyActionListener) getActivity()).prepareRemainingFragments(); |
|
|
|
|
|
} else { |
|
|
|
|
|
showPopUpMessage(accountValidationApiResponse.getMsg(), CustomAlertDialog.AlertType.FAILED, null); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -488,10 +488,10 @@ public class PayoutModeSendMoneyFragment extends BaseFragment implements SendMon |
|
|
@Override |
|
|
@Override |
|
|
public void onFailed(String message) { |
|
|
public void onFailed(String message) { |
|
|
if (isUIReady()) { |
|
|
if (isUIReady()) { |
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED,null); |
|
|
|
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null); |
|
|
} else { |
|
|
} else { |
|
|
scheduleTaskLater(() -> { |
|
|
scheduleTaskLater(() -> { |
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED,null); |
|
|
|
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -499,10 +499,10 @@ public class PayoutModeSendMoneyFragment extends BaseFragment implements SendMon |
|
|
@Override |
|
|
@Override |
|
|
protected void onConnectionNotEstablished(String message) { |
|
|
protected void onConnectionNotEstablished(String message) { |
|
|
if (isUIReady()) { |
|
|
if (isUIReady()) { |
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET,null); |
|
|
|
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null); |
|
|
} else { |
|
|
} else { |
|
|
scheduleTaskLater(() -> { |
|
|
scheduleTaskLater(() -> { |
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET,null); |
|
|
|
|
|
|
|
|
showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|