|
|
@ -29,7 +29,7 @@ import java.util.List; |
|
|
|
import butterknife.BindView; |
|
|
|
import butterknife.ButterKnife; |
|
|
|
|
|
|
|
public class RecipientAddV2Activity extends BaseActivity implements View.OnClickListener, RecipientAddV2PresenterInterface.RecipientAddV2ContractInterface { |
|
|
|
public class RecipientAddV2Activity extends BaseActivity implements View.OnClickListener, RecipientAddV2PresenterInterface.RecipientAddV2ContractInterface { |
|
|
|
|
|
|
|
|
|
|
|
@BindView(R.id.iv_back) |
|
|
@ -117,10 +117,15 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
private List<RelationDetailModel> relationList; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private RecipientInfoModel recipientToBeEdited = null; |
|
|
|
private String selectedRecipientId = ""; |
|
|
|
|
|
|
|
private GenericTextListingDialog<TransferDetailModel> transferListingDialog; |
|
|
|
GenericTextListingDialog<RelationDetailModel> relationListingDialog; |
|
|
|
GenericTextListingDialog<DistrictDetailModel> districtListingDialog; |
|
|
|
GenericTextListingDialog<ProvinceDetailModel> provinceListingDialog; |
|
|
|
GenericTextListingDialog<CountryDetailModel> countryListingDialog; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* ed_firstname |
|
|
@ -261,7 +266,8 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
|
|
|
|
private void showTransferListingInDialogV2() { |
|
|
|
hideKeyBoard(); |
|
|
|
GenericTextListingDialog<TransferDetailModel> transferListingDialog =new GenericTextListingDialog<>(); |
|
|
|
if (transferListingDialog == null) |
|
|
|
transferListingDialog = new GenericTextListingDialog<>(); |
|
|
|
transferListingDialog.setData(this.transferReasonList); |
|
|
|
transferListingDialog.setListener(transferDetailModel -> |
|
|
|
{ |
|
|
@ -269,18 +275,17 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
this.ed_transfer.setText(this.selectedTransferReason.getText()); |
|
|
|
transferListingDialog.dismiss(); |
|
|
|
}); |
|
|
|
transferListingDialog.setHintAndTitle(getString(R.string.search_transfer_reason_text),getString(R.string.select_transfer_reason_text),getString(R.string.no_transfer_reason_found_text)); |
|
|
|
transferListingDialog.setHintAndTitle(getString(R.string.search_transfer_reason_text), getString(R.string.select_transfer_reason_text), getString(R.string.no_transfer_reason_found_text)); |
|
|
|
transferListingDialog.disableSearch(false); |
|
|
|
if (!transferListingDialog.isAdded()) |
|
|
|
transferListingDialog.show(getSupportFragmentManager(), "TRANSFERDIALOG"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void showRelationListingInDialogV2() { |
|
|
|
hideKeyBoard(); |
|
|
|
GenericTextListingDialog<RelationDetailModel> relationListingDialog =new GenericTextListingDialog<>(); |
|
|
|
if (relationListingDialog == null) |
|
|
|
relationListingDialog = new GenericTextListingDialog<>(); |
|
|
|
relationListingDialog.setData(this.relationList); |
|
|
|
relationListingDialog.setListener(selectedRelation -> |
|
|
|
{ |
|
|
@ -288,15 +293,13 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
this.ed_relation.setText(this.selectedRelation.getText()); |
|
|
|
relationListingDialog.dismiss(); |
|
|
|
}); |
|
|
|
relationListingDialog.setHintAndTitle(getString(R.string.search_relation_text),getString(R.string.select_relation_text),getString(R.string.no_relation_found_text)); |
|
|
|
relationListingDialog.setHintAndTitle(getString(R.string.search_relation_text), getString(R.string.select_relation_text), getString(R.string.no_relation_found_text)); |
|
|
|
relationListingDialog.disableSearch(false); |
|
|
|
if (!relationListingDialog.isAdded()) |
|
|
|
relationListingDialog.show(getSupportFragmentManager(), "RelationListingDialog"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void showDistrictListingInDialogV2() { |
|
|
|
|
|
|
|
if (this.selectedProvince == null) { |
|
|
@ -304,7 +307,8 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
return; |
|
|
|
} |
|
|
|
hideKeyBoard(); |
|
|
|
GenericTextListingDialog<DistrictDetailModel> districtListingDialog =new GenericTextListingDialog<>(); |
|
|
|
if (districtListingDialog == null) |
|
|
|
districtListingDialog = new GenericTextListingDialog<>(); |
|
|
|
districtListingDialog.setData(this.selectedProvince.getDistrict()); |
|
|
|
districtListingDialog.setListener(districtDetailModel -> |
|
|
|
{ |
|
|
@ -312,14 +316,13 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
this.ed_district.setText(this.selectedDistrict.getText()); |
|
|
|
districtListingDialog.dismiss(); |
|
|
|
}); |
|
|
|
districtListingDialog.setHintAndTitle(getString(R.string.search_district_text),getString(R.string.select_district_text),getString(R.string.no_district_found_text)); |
|
|
|
districtListingDialog.setHintAndTitle(getString(R.string.search_district_text), getString(R.string.select_district_text), getString(R.string.no_district_found_text)); |
|
|
|
districtListingDialog.disableSearch(false); |
|
|
|
if (!districtListingDialog.isAdded()) |
|
|
|
districtListingDialog.show(getSupportFragmentManager(), "RelationListingDialog"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void showProvinceListingInDialogV2() { |
|
|
|
|
|
|
|
if (this.selectedCountry == null) { |
|
|
@ -327,7 +330,8 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
return; |
|
|
|
} |
|
|
|
hideKeyBoard(); |
|
|
|
GenericTextListingDialog<ProvinceDetailModel> provinceListingDialog =new GenericTextListingDialog<>(); |
|
|
|
if (provinceListingDialog == null) |
|
|
|
provinceListingDialog = new GenericTextListingDialog<>(); |
|
|
|
provinceListingDialog.setData(this.selectedCountry.getProvinces()); |
|
|
|
provinceListingDialog.setListener(selectedProvince -> |
|
|
|
{ |
|
|
@ -335,17 +339,17 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
this.ed_province.setText(this.selectedProvince.getText()); |
|
|
|
provinceListingDialog.dismiss(); |
|
|
|
}); |
|
|
|
provinceListingDialog.setHintAndTitle(getString(R.string.search_province_text),getString(R.string.select_province_text),getString(R.string.no_province_found_text)); |
|
|
|
provinceListingDialog.setHintAndTitle(getString(R.string.search_province_text), getString(R.string.select_province_text), getString(R.string.no_province_found_text)); |
|
|
|
provinceListingDialog.disableSearch(false); |
|
|
|
if (!provinceListingDialog.isAdded()) |
|
|
|
provinceListingDialog.show(getSupportFragmentManager(), "ProvinceListingDialog"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void showCountryListingInDialogV2() { |
|
|
|
hideKeyBoard(); |
|
|
|
GenericTextListingDialog<CountryDetailModel> countryListingDialog =new GenericTextListingDialog<>(); |
|
|
|
if (countryListingDialog == null) |
|
|
|
countryListingDialog = new GenericTextListingDialog<>(); |
|
|
|
countryListingDialog.setData(this.countryList); |
|
|
|
countryListingDialog.setListener(countryPaymentService -> |
|
|
|
{ |
|
|
@ -367,7 +371,7 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
} |
|
|
|
countryListingDialog.dismiss(); |
|
|
|
}); |
|
|
|
countryListingDialog.setHintAndTitle(getString(R.string.search_country_text),getString(R.string.select_country_text),getString(R.string.no_country_found_text)); |
|
|
|
countryListingDialog.setHintAndTitle(getString(R.string.search_country_text), getString(R.string.select_country_text), getString(R.string.no_country_found_text)); |
|
|
|
countryListingDialog.disableSearch(false); |
|
|
|
if (!countryListingDialog.isAdded()) |
|
|
|
countryListingDialog.show(getSupportFragmentManager(), "CountryListingDialog"); |
|
|
@ -439,7 +443,7 @@ public class RecipientAddV2Activity extends BaseActivity implements View.OnClick |
|
|
|
|
|
|
|
@Override |
|
|
|
public void setErrorOnTransferReason(String message) { |
|
|
|
transferWrapper.setError(message); |
|
|
|
transferWrapper.setError(message); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|